/* Taxonomy / shop sidebar filters */

.mks-as {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mks-as-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0 2px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
}

.mks-as-heading i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--mks-bg-soft, rgba(115, 82, 172, 0.1));
    color: var(--mks-color-primary, #7352ac);
    font-size: 14px;
}

.mks-as > li.widget {
    position: relative;
    background: #fff;
    border: 1px solid #ebecef;
    border-radius: 16px;
    padding: 0;
    margin: 0 0 12px !important;
    max-height: none;
    overflow: hidden;
    list-style: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    animation: none;
}

.mks-as > li.widget::before {
    content: none;
}

.mks-as > li.widget:hover {
    border-color: #e2e0ea;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.mks-as .widgettitle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #f1f2f6;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.mks-as .widgettitle:after {
    content: none !important;
}

.mks-as-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--mks-bg-soft, rgba(115, 82, 172, 0.1));
    color: var(--mks-color-primary, #7352ac);
    font-size: 13px;
}

.mks-as-title-text {
    flex: 1;
    min-width: 0;
}

.mks-as-chevron {
    margin-inline-start: auto;
    color: #94a3b8;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.mks-as > li.is-collapsed .mks-as-chevron {
    transform: rotate(90deg);
}

.mks-as-body {
    padding: 12px 14px 14px;
}

.mks-as > li.is-collapsed .mks-as-body,
.mks-as > li.is-collapsed .mks-wf-tg-show {
    display: none;
}

.mks-as > li.has-overflow:not(.is-expanded) .mks-as-body {
    max-height: 248px;
    overflow: hidden;
}

.mks-as ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mks-as .woocommerce .star-rating,
.mks-as .star-rating {
    font-size: 13px;
    color: #f5b942;
}

/* Search */

.mks-as > .widget_product_search .mks-as-body {
    padding: 10px;
}

.mks-as .mks-as-search,
.mks-as li form.woocommerce-product-search {
    display: block;
    width: 100%;
}

.mks-as-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 4px 4px 4px 10px;
    background: #f7f6fa;
    border: 1px solid #ebecef;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mks-as-search-field:focus-within {
    background: #fff;
    border-color: rgba(115, 82, 172, 0.4);
    box-shadow: 0 0 0 3px rgba(115, 82, 172, 0.1);
}

.mks-as-search-field > i {
    color: #94a3b8;
    font-size: 14px;
    flex-shrink: 0;
}

.mks-as .mks-as-search-field input,
.mks-as li form.woocommerce-product-search input {
    flex: 1;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 0 4px;
    border: 0 !important;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    color: #1e293b;
    border-radius: 0 !important;
}

.mks-as .mks-as-search-field input:focus {
    outline: none;
    box-shadow: none;
}

.mks-as .mks-as-search-field button,
.mks-as li form.woocommerce-product-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px !important;
    background: var(--mks-primary-gradient, linear-gradient(135deg, #7352ac 0%, #5a3d8a 100%));
    color: #fff;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mks-as .mks-as-search-field button i {
    font-size: 14px;
    color: #fff;
}

.mks-as .mks-as-search-field button:hover {
    transform: translateY(-1px);
    box-shadow: var(--mks-shadow, 0 4px 12px rgba(115, 82, 172, 0.25));
}

/* Price filter */

.mks-as .widget_price_filter form,
.widget_price_filter form {
    width: 100%;
    padding-top: 4px;
}

.mks-as .price_slider_wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mks-as .woocommerce .widget_price_filter .price_slider,
.mks-as .widget_price_filter .price_slider,
.mks-as .price_slider.ui-slider {
    height: 6px;
    margin: 10px 8px 6px;
    background: #ece8f4 !important;
    border: 0;
    border-radius: 99px;
}

.mks-as .woocommerce .widget_price_filter .ui-slider-range,
.mks-as .price_slider .ui-slider-range,
.mks-as .price_slider div.ui-slider-range {
    background: var(--mks-primary-gradient, linear-gradient(135deg, #7352ac 0%, #5a3d8a 100%)) !important;
    border-radius: 99px;
}

.mks-as .price_slider .ui-slider-handle,
.mks-as .widget_price_filter .ui-slider-handle,
.mks-as .price_slider span.ui-slider-handle {
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background: #fff !important;
    border: 2px solid var(--mks-color-primary, #7352ac) !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
    cursor: grab;
}

.mks-as .price_slider_amount {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mks-as .price_slider_amount .price_label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0;
    color: #475569;
    text-align: center;
}

.mks-as .price_slider_amount .price_label .from,
.mks-as .price_slider_amount .price_label .to {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #f7f6fa;
    border: 1px solid #ebecef;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    flex: 1;
}

.mks-as .price_slider_amount .price_label .mks-toman-symbol {
    width: 12px;
    height: auto;
    margin-inline-start: 3px;
}

.mks-as .woocommerce .widget_price_filter .price_slider_amount .button,
.mks-as .widget_price_filter .button {
    float: none;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: var(--mks-primary-gradient, linear-gradient(135deg, #7352ac 0%, #5a3d8a 100%));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mks-as .widget_price_filter .button:hover {
    box-shadow: var(--mks-shadow, 0 4px 12px rgba(115, 82, 172, 0.25));
}

.mks-as .price_slider_amount .clear {
    display: none;
}

/* Rating + layered nav + categories */

.mks-as .widget_rating_filter ul,
.woocommerce .widget_rating_filter ul {
    padding: 0 !important;
}

.mks-as .wc-layered-nav-rating,
.mks-as .woocommerce-widget-layered-nav-list__item,
.mks-as .widget_categories .cat-item,
.mks-as .widget_product_categories li,
.mks-as .wc-layered-nav-term {
    position: relative;
    margin: 0 0 6px;
    padding: 0;
    font-size: 13px;
}

.mks-as .widget_product_categories li:before,
.mks-as .wc-layered-nav-term:before,
.mks-as li.current-cat:after,
.mks-as li.chosen:after {
    content: none !important;
    display: none !important;
}

.mks-as .wc-layered-nav-rating a,
.mks-as .woocommerce-widget-layered-nav-list__item a,
.mks-as .widget_categories .cat-item a,
.mks-as .widget_product_categories li > a,
.mks-as .wc-layered-nav-term a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    background: #fff;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mks-as .wc-layered-nav-rating a:hover,
.mks-as .woocommerce-widget-layered-nav-list__item a:hover,
.mks-as .widget_categories .cat-item a:hover,
.mks-as .widget_product_categories li > a:hover,
.mks-as .wc-layered-nav-term a:hover {
    background: #f7f6fa;
    color: var(--mks-color-primary, #7352ac);
    text-decoration: none;
}

.mks-as .woocommerce-widget-layered-nav-list__item a::before,
.mks-as .widget_product_categories li > a::before,
.mks-as .widget_categories .cat-item a::before,
.mks-as .wc-layered-nav-term a::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #d7d4e0;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.mks-as li.chosen > a::before,
.mks-as li.current-cat > a::before,
.mks-as .woocommerce-widget-layered-nav-list__item.chosen a::before,
.mks-as .wc-layered-nav-term.chosen a::before {
    border-color: var(--mks-color-primary, #7352ac);
    background: var(--mks-color-primary, #7352ac) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.mks-as li.current-cat > a,
.mks-as li.current-cat > span,
.mks-as li.chosen > a,
.mks-as li.chosen > span,
.mks-as .woocommerce-widget-layered-nav-list__item.chosen a,
.mks-as .wc-layered-nav-rating.chosen a {
    color: var(--mks-color-primary, #7352ac);
    font-weight: 700;
    background: var(--mks-bg-soft, rgba(115, 82, 172, 0.08));
    border-color: rgba(115, 82, 172, 0.18);
}

.mks-as .count,
.mks-as .mks-as-count {
    margin-inline-start: auto;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f2f6;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    flex-shrink: 0;
}

.mks-as .woocommerce-widget-layered-nav-list__item .count,
.mks-as .widget_product_categories .count,
.mks-as .widget_categories .count {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.mks-as .woocommerce-widget-layered-nav-list__item a,
.mks-as .widget_product_categories li > a,
.mks-as .widget_categories .cat-item a {
    padding-inline-end: 42px;
}

.mks-as li.chosen .count,
.mks-as li.chosen .mks-as-count,
.mks-as li.current-cat .count {
    background: #fff;
    color: var(--mks-color-primary, #7352ac);
}

.mks-as .wc-layered-nav-rating .star-rating {
    float: none;
    margin: 0;
}

/* Recently viewed products + reviews */

.mks-as ul.product_list_widget li,
.mks-as ul.cart_list li,
.mks-as .mks-as-product,
.mks-as .mks-as-review {
    display: block;
    margin: 0 0 8px;
    padding: 0 !important;
    border: 0;
    border-bottom: 0 !important;
}

.mks-as ul.product_list_widget li:last-child,
.mks-as .mks-as-product:last-child,
.mks-as .mks-as-review:last-child {
    margin-bottom: 0;
}

.mks-as .mks-as-product-card,
.mks-as .mks-as-review-card,
.woocommerce .mks-as ul.product_list_widget .mks-as-review-card,
.woocommerce .mks-as ul.product_list_widget .mks-as-product-card {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: #f7f6fa;
    border: 1px solid #eeeef3;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mks-as .mks-as-product-card:hover,
.mks-as .mks-as-review-card:hover {
    background: #fff;
    border-color: rgba(115, 82, 172, 0.22);
    text-decoration: none;
    color: inherit;
}

.mks-as .mks-as-product-thumb,
.mks-as .mks-as-review-thumb {
    display: block;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    border: 1px solid #f1f2f6;
}

.mks-as .mks-as-product-thumb img,
.mks-as .mks-as-review-thumb img,
.mks-as ul.product_list_widget li img {
    float: none !important;
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    margin: 0 !important;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.mks-as .mks-as-product-info,
.mks-as .mks-as-review-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    flex: 1;
    text-align: start;
}

.mks-as .product_list_widget .product-title,
.mks-as .mks-as-product .product-title,
.mks-as .mks-as-review .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    color: #1e293b;
    text-decoration: none;
    text-align: start;
}

.mks-as .mks-as-product .product-title:hover,
.mks-as .mks-as-review-card:hover .product-title {
    color: var(--mks-color-primary, #7352ac);
}

.mks-as ul.product_list_widget li .price,
.mks-as .mks-as-product .price {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mks-color-primary, #7352ac);
}

.mks-as .product_list_widget .woocommerce-Price-amount,
.mks-as .product_list_widget .woocommerce-Price-amount bdi {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
}

.mks-as .product_list_widget .mks-toman-symbol,
.mks-as .mks-toman-symbol {
    width: auto !important;
    height: 10px !important;
    max-width: 28px !important;
    max-height: 10px !important;
    margin: 0 !important;
    vertical-align: middle;
    object-fit: contain;
}

.mks-as .product_list_widget del,
.mks-as .product_list_widget del .woocommerce-Price-amount,
.mks-as .product_list_widget del .woocommerce-Price-amount bdi {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.mks-as .product_list_widget .mks-price-container {
    display: flex !important;
    width: 100%;
    min-height: 0;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.mks-as .product_list_widget .mks-price-container > div:nth-child(2),
.mks-as ul.product_list_widget li .mks_aac_loading {
    display: none !important;
}

.mks-as .product_list_widget .mks-stop-sale-label {
    font-size: 11px;
}

.mks-as .widget_recently_viewed_products .star-rating {
    display: none;
}

.mks-as .widget_recent_reviews .star-rating,
.mks-as .mks-as-review .star-rating {
    display: block;
    float: none;
    margin: 0;
    font-size: 11px;
}

.mks-as .mks-as-review .reviewer {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

/* Show more */

.mks-as .mks-wf-tg-show {
    display: none;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 0;
    padding: 8px 14px 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, #fff 46%);
    color: var(--mks-color-primary, #7352ac);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.mks-as > li.has-overflow:not(.is-expanded) .mks-wf-tg-show,
.mks-as > li.is-expanded .mks-wf-tg-show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mks-as > li.has-overflow:not(.is-expanded) .mks-wf-tg-show {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 28px;
}

.mks-as .mks-wf-tg-show i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.mks-as > li.is-expanded .mks-wf-tg-show i {
    transform: rotate(180deg);
}

/* Active filters widget */

.mks-as .widget_layered_nav_filters ul li {
    margin: 0 0 6px;
}

.mks-as .widget_layered_nav_filters a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--mks-bg-soft, rgba(115, 82, 172, 0.08));
    color: var(--mks-color-primary, #7352ac);
    font-size: 12px;
    text-decoration: none;
}

/* Mobile sheet */

.mks-archive-sheet--filter .mks-as {
    margin: 0;
}

.mks-archive-sheet--filter .mks-as-heading {
    display: none;
}

.mks-archive-sheet--filter .mks-as > li.widget {
    margin-bottom: 10px !important;
    border-radius: 14px;
    box-shadow: none;
}

.mks-archive-sheet--filter .mks-as .widgettitle {
    font-size: 13px;
    padding: 10px 12px !important;
}

@media (max-width: 991.98px) {
    .mks-as-heading {
        display: none;
    }
}

html[dir="ltr"] .mks-as > li.is-collapsed .mks-as-chevron {
    transform: rotate(-90deg);
}

html[dir="ltr"] .mks-as-search-field {
    padding: 4px 10px 4px 4px;
}

html[dir="ltr"] .mks-as .mks-as-search-field button i {
    transform: scaleX(-1);
}
