/* Roshd Sabz shop/archive experience — 0.6.25 */

:root {
    --rs-shop-green:#739d20;
    --rs-shop-green-dark:#2f6f43;
    --rs-shop-green-deep:#214f32;
    --rs-shop-green-soft:#edf6dc;
    --rs-shop-green-pale:#f6f9f1;
    --rs-shop-line:rgba(74,119,46,.16);
    --rs-shop-text:#283b30;
    --rs-shop-muted:#718077;
    --rs-shop-orange:#ff8c5e;
}

.rs-shop-shell {
    width:min(calc(100% - 48px), 1240px)!important;
    max-width:1240px!important;
    padding:0!important;
    margin:34px auto 90px!important;
}

.rs-shop-archive {
    position:relative;
    width:100%;
    color:var(--rs-shop-text);
}


.rs-shop-breadcrumb .woocommerce-breadcrumb {
    margin:0 2px 12px!important;
    color:#849087;
    font-size:.68rem;
}
.rs-shop-breadcrumb .woocommerce-breadcrumb a{color:#5f7f29;text-decoration:none}
.rs-shop-archive-description:empty{display:none}
.rs-shop-archive-description .term-description,
.rs-shop-archive-description .page-description{
    margin:0 0 16px;
    padding:15px 18px;
    border:1px solid var(--rs-shop-line);
    border-radius:16px;
    background:#fbfdf9;
    color:#637269;
    font-size:.72rem;
    line-height:1.95;
}
.rs-shop-archive-description p:last-child{margin-bottom:0}

.rs-shop-hero {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:20px;
    padding:28px 30px;
    border:1px solid var(--rs-shop-line);
    border-radius:26px;
    background:
        radial-gradient(circle at 8% 20%, rgba(184,216,117,.22), transparent 26%),
        linear-gradient(135deg,#fbfdf8 0%,#f2f7e9 100%);
    box-shadow:0 14px 35px rgba(43,82,49,.055);
}

.rs-shop-hero__eyebrow {
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:5px 12px;
    margin-bottom:8px;
    border-radius:999px;
    background:#e8f3d1;
    color:#527516;
    font-size:.76rem;
    font-weight:800;
}

.rs-shop-hero__title {
    margin:0;
    color:var(--rs-shop-green-deep);
    font-size:clamp(1.55rem,2.4vw,2.25rem);
    font-weight:900;
    line-height:1.35;
}

.rs-shop-hero__desc {
    max-width:720px;
    margin:8px 0 0;
    color:var(--rs-shop-muted);
    font-size:.84rem;
    line-height:1.9;
}

.rs-shop-filter-toggle {
    display:none;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:44px;
    padding:0 16px;
    border:1px solid #8cb33a;
    border-radius:13px;
    background:#fff;
    color:#416512;
    font:inherit;
    font-size:.78rem;
    font-weight:800;
    cursor:pointer;
}

.rs-shop-sortbar {
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
    margin-bottom:18px;
    padding:12px 14px;
    border:1px solid var(--rs-shop-line);
    border-radius:18px;
    background:#fff;
    box-shadow:0 8px 24px rgba(32,70,42,.045);
}

.rs-shop-sortbar__label {
    display:flex;
    align-items:center;
    gap:5px;
    flex:0 0 auto;
    color:#405449;
    font-size:.75rem;
    font-weight:800;
    white-space:nowrap;
}

.rs-shop-sort-options {
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
    flex:1 1 auto;
    overflow-x:auto;
    scrollbar-width:none;
}
.rs-shop-sort-options::-webkit-scrollbar{display:none}

.rs-shop-sort-button,
.rs-shop-view-button {
    appearance:none;
    border:1px solid transparent;
    background:#f5f8f1;
    color:#5b6b61;
    font:inherit;
    font-size:.69rem;
    font-weight:700;
    white-space:nowrap;
    cursor:pointer;
    transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}

.rs-shop-sort-button {
    min-height:34px;
    padding:0 11px;
    border-radius:10px;
}

.rs-shop-sort-button:hover,
.rs-shop-sort-button.is-active {
    border-color:rgba(115,157,32,.28);
    background:var(--rs-shop-green-soft);
    color:#476b17;
}

.rs-shop-view-controls {
    display:flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
    padding-right:10px;
    border-right:1px solid #e3e9df;
}

.rs-shop-view-controls__label {
    color:#66756c;
    font-size:.68rem;
}

.rs-shop-view-desktop,
.rs-shop-view-mobile {
    display:flex;
    align-items:center;
    gap:4px;
}
.rs-shop-view-mobile{display:none}

.rs-shop-view-button {
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    padding:0;
    border-radius:9px;
}

.rs-shop-view-button.is-active {
    border-color:#8eb33f;
    background:#7da925;
    color:#fff;
}

.rs-shop-layout {
    display:grid;
    grid-template-columns:minmax(235px,280px) minmax(0,1fr);
    gap:20px;
    align-items:start;
}

.rs-shop-filters {
    position:sticky;
    top:92px;
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
}

body.admin-bar .rs-shop-filters{top:124px}

.rs-shop-filters__mobile-head{display:none}

.rs-shop-filter-card {
    overflow:hidden;
    padding:18px;
    border:1px solid var(--rs-shop-line);
    border-radius:20px;
    background:#fbfdf9;
    box-shadow:0 8px 24px rgba(34,70,43,.04);
}

.rs-shop-filter-card h2,
.rs-shop-filter-card__head h2 {
    margin:0 0 15px;
    color:#334b3c;
    font-size:.86rem;
    font-weight:900;
}

.rs-shop-filter-card__head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.rs-shop-filter-mini-reset {
    appearance:none;
    border:0;
    padding:0;
    background:transparent;
    color:#7b9660;
    font:inherit;
    font-size:.64rem;
    cursor:pointer;
}

.rs-shop-price-values {
    display:flex;
    justify-content:space-between;
    gap:8px;
    margin-bottom:19px;
}

.rs-shop-price-value {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    max-width:48%;
    min-height:34px;
    padding:5px 9px;
    border:1px solid #e2e9df;
    border-radius:999px;
    background:#fff;
    color:#263b30;
    font-size:.66rem;
    font-weight:800;
    white-space:nowrap;
    direction:rtl;
}

.rs-shop-range {
    --min-pos:0%;
    --max-pos:100%;
    position:relative;
    height:28px;
    margin:0 4px 2px;
}

.rs-shop-range__track,
.rs-shop-range__fill {
    position:absolute;
    top:50%;
    right:0;
    left:0;
    height:6px;
    border-radius:999px;
    transform:translateY(-50%);
}
.rs-shop-range__track{background:#dfe9e7}
.rs-shop-range__fill{
    right:var(--min-pos);
    left:calc(100% - var(--max-pos));
    background:linear-gradient(90deg,#9fc34d,#739d20);
}

.rs-shop-range input[type="range"] {
    position:absolute;
    inset:0;
    z-index:2;
    width:100%;
    height:28px;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    pointer-events:none;
    -webkit-appearance:none;
    appearance:none;
}
.rs-shop-range input[type="range"]::-webkit-slider-runnable-track{height:6px;background:transparent}
.rs-shop-range input[type="range"]::-moz-range-track{height:6px;background:transparent}
.rs-shop-range input[type="range"]::-webkit-slider-thumb{
    width:19px;height:19px;margin-top:-6.5px;border:3px solid #fff;border-radius:50%;background:var(--rs-shop-orange);box-shadow:0 4px 12px rgba(255,117,72,.34);pointer-events:auto;-webkit-appearance:none;appearance:none;cursor:grab
}
.rs-shop-range input[type="range"]::-moz-range-thumb{
    width:14px;height:14px;border:3px solid #fff;border-radius:50%;background:var(--rs-shop-orange);box-shadow:0 4px 12px rgba(255,117,72,.34);pointer-events:auto;cursor:grab
}

.rs-shop-category-list {
    display:flex;
    flex-direction:column;
    gap:5px;
    max-height:292px;
    overflow:auto;
    padding-left:3px;
}

.rs-shop-radio {
    display:grid;
    grid-template-columns:17px minmax(0,1fr) auto;
    align-items:center;
    gap:7px;
    min-height:36px;
    padding:5px 7px;
    border-radius:10px;
    color:#4a5b51;
    font-size:.7rem;
    cursor:pointer;
}
.rs-shop-radio:hover{background:#f0f6e8}
.rs-shop-radio input{accent-color:#7da925}
.rs-shop-radio small{color:#8b978f;font-size:.61rem}

.rs-shop-switch-row {
    display:grid;
    grid-template-columns:minmax(0,1fr) 42px;
    align-items:center;
    gap:10px;
    position:relative;
    min-height:52px;
    padding:9px 0;
    border-bottom:1px solid #e7ece4;
    cursor:pointer;
}
.rs-shop-switch-row:last-child{border-bottom:0}
.rs-shop-switch-row > span{display:flex;flex-direction:column;gap:2px}
.rs-shop-switch-row strong{font-size:.7rem;color:#3d5045}
.rs-shop-switch-row small{font-size:.61rem;color:#89968e}
.rs-shop-switch-row input{position:absolute;opacity:0;pointer-events:none}
.rs-shop-switch-row i{
    position:relative;
    width:40px;
    height:22px;
    border-radius:999px;
    background:#dfe6df;
    transition:.2s ease;
}
.rs-shop-switch-row i::after{
    content:"";
    position:absolute;
    top:3px;
    right:3px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 2px 5px rgba(0,0,0,.12);
    transition:.2s ease;
}
.rs-shop-switch-row input:checked + i{background:#7da925}
.rs-shop-switch-row input:checked + i::after{transform:translateX(-18px)}

.rs-shop-reset {
    width:100%;
    min-height:42px;
    border:1px solid rgba(115,157,32,.34);
    border-radius:13px;
    background:#fff;
    color:#55751c;
    font:inherit;
    font-size:.72rem;
    font-weight:800;
    cursor:pointer;
}
.rs-shop-reset:hover{background:#edf6dc}

.rs-shop-products-area {
    position:relative;
    min-width:0;
}

.rs-shop-results__meta {
    display:flex;
    align-items:center;
    min-height:31px;
    margin:0 0 10px;
}
.rs-shop-result-count {
    margin:0!important;
    color:#77847c;
    font-size:.7rem;
}

/* Archive grid explicitly controls the custom product cards. */
.woocommerce .rs-shop-product-grid {
    --rs-shop-cols:5;
    display:grid!important;
    grid-template-columns:repeat(var(--rs-shop-cols),minmax(0,1fr))!important;
    gap:14px!important;
    width:100%!important;
    margin:0!important;
}
.woocommerce .rs-shop-product-grid > li.rs-product-loop-item{min-width:0!important}

.rs-shop-archive[data-view="grid-5"] .rs-shop-product-grid{--rs-shop-cols:5}
.rs-shop-archive[data-view="grid-4"] .rs-shop-product-grid{--rs-shop-cols:4}
.rs-shop-archive[data-view="grid-3"] .rs-shop-product-grid{--rs-shop-cols:3}

.rs-shop-loading {
    position:absolute;
    inset:31px 0 auto;
    z-index:30;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:110px;
    border-radius:18px;
    background:rgba(250,252,248,.86);
    color:#4c681c;
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
}
.rs-shop-loading[hidden]{display:none!important}
.rs-shop-loading span{width:20px;height:20px;border:2px solid #ceddbb;border-top-color:#739d20;border-radius:50%;animation:rsShopSpin .7s linear infinite}
.rs-shop-loading strong{font-size:.7rem}
@keyframes rsShopSpin{to{transform:rotate(360deg)}}
.rs-shop-products-area.is-loading .rs-shop-results{opacity:.42;pointer-events:none}

.rs-shop-empty {
    display:grid;
    place-items:center;
    min-height:350px;
    padding:35px;
    text-align:center;
    border:1px dashed rgba(115,157,32,.34);
    border-radius:22px;
    background:#f9fcf5;
}
.rs-shop-empty__icon{font-size:2rem;color:#8dab4d}
.rs-shop-empty h2{margin:4px 0;color:#37533f;font-size:1.05rem}
.rs-shop-empty p{margin:0 0 14px;color:#7c8981;font-size:.73rem}
.rs-shop-reset--empty{max-width:180px}

/* Pagination */
.woocommerce .rs-shop-products-area nav.woocommerce-pagination,
.woocommerce nav.woocommerce-pagination {
    margin:32px 0 0!important;
    text-align:center;
}
.woocommerce nav.woocommerce-pagination ul {
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    gap:7px;
    margin:0!important;
    padding:7px!important;
    border:1px solid var(--rs-shop-line)!important;
    border-radius:15px;
    background:#fff;
    box-shadow:0 8px 24px rgba(35,72,43,.05);
}
.woocommerce nav.woocommerce-pagination ul li{border:0!important;float:none!important}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span,
.woocommerce nav.woocommerce-pagination ul li button.page-numbers {
    display:grid!important;
    place-items:center;
    min-width:36px!important;
    height:36px!important;
    margin:0!important;
    padding:0 8px!important;
    border:0!important;
    border-radius:10px!important;
    background:#f3f7ee!important;
    color:#4a6252!important;
    font:inherit!important;
    font-size:.72rem!important;
    font-weight:800!important;
    line-height:1!important;
    cursor:pointer;
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li button:hover {
    background:#739d20!important;
    color:#fff!important;
}

.rs-shop-filter-backdrop{display:none}

/* list view */
.rs-shop-archive[data-view="list"] .rs-shop-product-grid{grid-template-columns:1fr!important;gap:10px!important}
.rs-shop-archive[data-view="list"] .rs-product-card{
    display:grid;
    grid-template-columns:180px minmax(0,1fr);
    align-items:center;
    min-height:180px;
    padding:12px;
}
.rs-shop-archive[data-view="list"] .rs-product-card__media{min-height:150px;height:150px;margin:0}
.rs-shop-archive[data-view="list"] .rs-product-card__image{height:100%;object-fit:contain}
.rs-shop-archive[data-view="list"] .rs-product-card__body{padding:5px 15px 5px 4px}
.rs-shop-archive[data-view="list"] .rs-product-card__description{display:-webkit-box!important;min-height:0;-webkit-line-clamp:2}
.rs-shop-archive[data-view="list"] .rs-product-card__actions{max-width:360px}

@media(max-width:1199.98px){
    .rs-shop-shell{width:min(calc(100% - 32px),1220px)!important}
    .rs-shop-layout{grid-template-columns:245px minmax(0,1fr)}
    .rs-shop-archive[data-view="grid-5"] .rs-shop-product-grid{--rs-shop-cols:4}
}

@media(max-width:991.98px){
    .rs-shop-shell{width:min(calc(100% - 24px),920px)!important;margin-top:22px!important}
    .rs-shop-hero{padding:22px;border-radius:21px}
    .rs-shop-filter-toggle{display:inline-flex}
    .rs-shop-layout{display:block}
    .rs-shop-filters{
        position:fixed;
        top:auto;
        right:10px;
        bottom:calc(var(--rs-mobile-bottom-nav-height, 78px) + env(safe-area-inset-bottom,0px) + 9px);
        left:10px;
        z-index:2147483050;
        max-height:min(76dvh,680px);
        padding:14px;
        overflow:auto;
        border:1px solid rgba(72,114,50,.18);
        border-radius:24px;
        background:#fff;
        box-shadow:0 -18px 55px rgba(18,56,34,.2);
        transform:translateY(calc(100% + 120px));
        visibility:hidden;
        transition:transform .28s cubic-bezier(.22,.75,.22,1),visibility .28s;
    }
    .rs-shop-archive.is-filter-open .rs-shop-filters{transform:none;visibility:visible}
    .rs-shop-filters__mobile-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-14px;z-index:3;margin:-14px -14px 0;padding:13px 15px;border-bottom:1px solid #e8ede5;background:#fff}
    .rs-shop-filters__mobile-head strong{font-size:.85rem;color:#344c3b}
    .rs-shop-filter-close{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:#eef5e7;color:#446118;font-size:1.25rem;cursor:pointer}
    .rs-shop-filter-backdrop{position:fixed;inset:0;z-index:2147483000;background:rgba(15,35,23,.28);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
    .rs-shop-archive.is-filter-open .rs-shop-filter-backdrop{display:block}
    .rs-shop-sortbar{flex-wrap:wrap}
    .rs-shop-sort-options{order:3;flex:1 0 100%;padding-top:3px}
    .rs-shop-view-controls{margin-right:auto}
    .rs-shop-view-desktop{display:none}
    .rs-shop-view-mobile{display:flex}
    .woocommerce .rs-shop-product-grid{--rs-shop-cols:2}
    .rs-shop-archive[data-view="grid-2"] .rs-shop-product-grid{--rs-shop-cols:2}
    .rs-shop-archive[data-view="grid-1"] .rs-shop-product-grid{--rs-shop-cols:1}
}

@media(max-width:767.98px){
    .rs-shop-shell{width:calc(100% - 18px)!important;margin:16px auto 110px!important}
    .rs-shop-hero{align-items:stretch;flex-direction:column;padding:18px 16px;border-radius:18px}
    .rs-shop-hero__desc{font-size:.72rem;line-height:1.8}
    .rs-shop-filter-toggle{width:100%}
    .rs-shop-sortbar{gap:7px;padding:10px;border-radius:15px}
    .rs-shop-sortbar__label{font-size:.68rem}
    .rs-shop-sort-button{min-height:32px;padding-inline:9px;font-size:.63rem}
    .rs-shop-view-controls{padding-right:7px}
    .rs-shop-view-controls__label{display:none}
    .rs-shop-view-button{width:31px;height:31px;font-size:.65rem}
    .rs-shop-results__meta{min-height:26px;margin-bottom:7px}
    .woocommerce .rs-shop-product-grid{gap:10px!important}
    .rs-shop-archive[data-view="grid-1"] .rs-product-card{max-width:100%}
    .rs-shop-archive[data-view="list"] .rs-product-card{grid-template-columns:112px minmax(0,1fr);min-height:126px;padding:8px}
    .rs-shop-archive[data-view="list"] .rs-product-card__media{height:104px;min-height:104px}
    .rs-shop-archive[data-view="list"] .rs-product-card__body{padding:3px 9px 3px 2px}
    .rs-shop-archive[data-view="list"] .rs-product-card__heading-row{min-height:0}
    .rs-shop-archive[data-view="list"] .rs-product-card__title{font-size:11px!important}
    .rs-shop-archive[data-view="list"] .rs-product-card__description{display:none!important}
    .rs-shop-archive[data-view="list"] .rs-product-card__actions{grid-template-columns:minmax(0,1fr) 31px 31px}
    .woocommerce nav.woocommerce-pagination{margin-top:24px!important;margin-bottom:10px!important}
    .woocommerce nav.woocommerce-pagination ul{gap:4px;padding:5px!important;border-radius:13px}
    .woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span,.woocommerce nav.woocommerce-pagination ul li button.page-numbers{min-width:32px!important;height:32px!important;font-size:.66rem!important}

    /* Search must render above the fixed mobile footer navigation. */
    body.rs-mobile-search-open .navbar-main.search-active{z-index:2147483450!important}
    body.rs-mobile-search-open .rs-ajax-search-panel{z-index:2147483500!important}
}

@media(max-width:370px){
    .rs-shop-shell{width:calc(100% - 12px)!important}
    .rs-shop-sortbar{padding-inline:7px}
    .rs-shop-sort-button{padding-inline:7px}
    .rs-shop-filters{right:6px;left:6px}
}

@media(prefers-reduced-motion:reduce){
    .rs-shop-filters,.rs-shop-sort-button,.rs-shop-view-button,.rs-shop-loading span{transition:none!important;animation:none!important}
}


/* ==========================================================================
 * Roshd Sabz 0.6.27 — archive grid fix + viewport filter + mobile side drawer
 * ========================================================================== */

.rs-shop-archive > .screen-reader-text + .rs-shop-archive-description {
    margin-top: 0;
}

@media (min-width: 992px) {
    .woocommerce .rs-shop-archive[data-view="grid-3"] ul.products.rs-shop-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .woocommerce .rs-shop-archive[data-view="grid-4"] ul.products.rs-shop-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .woocommerce .rs-shop-archive[data-view="grid-5"] ul.products.rs-shop-product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .rs-shop-layout {
        align-items: start;
    }

    .rs-shop-filters {
        position: sticky;
        top: 92px;
        height: calc(100dvh - 108px);
        max-height: calc(100dvh - 108px);
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        padding: 0 6px 8px 1px;
        align-self: start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(115,157,32,.45) transparent;
    }

    body.admin-bar .rs-shop-filters {
        top: 124px;
        height: calc(100dvh - 140px);
        max-height: calc(100dvh - 140px);
    }

    .rs-shop-filters .rs-shop-category-list {
        max-height: none;
        overflow: visible;
    }

    .rs-shop-filters::-webkit-scrollbar {
        width: 6px;
    }

    .rs-shop-filters::-webkit-scrollbar-track {
        background: transparent;
    }

    .rs-shop-filters::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(115,157,32,.36);
    }
}

@media (max-width: 991.98px) {
    .woocommerce .rs-shop-archive[data-view="grid-1"] ul.products.rs-shop-product-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .woocommerce .rs-shop-archive[data-view="grid-2"] ul.products.rs-shop-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .woocommerce .rs-shop-archive[data-view="list"] ul.products.rs-shop-product-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .rs-shop-filter-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 11px;
        border-radius: 10px;
        background: var(--rs-shop-green-soft);
    }

    .rs-shop-filters,
    body.admin-bar .rs-shop-filters {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(88vw, 390px);
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0;
        padding:
            max(14px, env(safe-area-inset-top, 0px))
            14px
            max(22px, env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        border: 0;
        border-left: 1px solid rgba(72,114,50,.16);
        border-radius: 24px 0 0 24px;
        background: #fff;
        box-shadow: -22px 0 60px rgba(18,56,34,.22);
        z-index: 2147483600;
        transform: translateX(105%);
        visibility: hidden;
        opacity: 1;
        transition:
            transform .32s cubic-bezier(.22,.75,.22,1),
            visibility .32s;
        -webkit-overflow-scrolling: touch;
    }

    .rs-shop-archive.is-filter-open .rs-shop-filters {
        transform: translateX(0);
        visibility: visible;
    }

    .rs-shop-filters .rs-shop-category-list {
        max-height: none;
        overflow: visible;
    }

    .rs-shop-filters__mobile-head {
        display: flex;
        position: sticky;
        top: calc(-1 * max(14px, env(safe-area-inset-top, 0px)));
        z-index: 8;
        align-items: center;
        justify-content: space-between;
        margin:
            calc(-1 * max(14px, env(safe-area-inset-top, 0px)))
            -14px
            12px;
        padding:
            max(14px, env(safe-area-inset-top, 0px))
            16px
            12px;
        border-bottom: 1px solid #e8ede5;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .rs-shop-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2147483500;
        background: rgba(14,34,22,.42);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .rs-shop-archive.is-filter-open .rs-shop-filter-backdrop {
        display: block;
    }

    body.rs-shop-filter-open {
        overflow: hidden !important;
    }
}

@media (max-width: 767.98px) {
    .rs-shop-sortbar {
        position: relative;
        margin-top: 4px;
    }

    .rs-shop-filter-toggle {
        min-width: 72px;
    }

    body.rs-mobile-search-open .navbar-main.search-active {
        z-index: 2147483700 !important;
    }

    body.rs-mobile-search-open .rs-ajax-search-panel {
        z-index: 2147483750 !important;
        padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
    }
}


/* ==========================================================================
 * Roshd Sabz 0.6.29 — unified filters + reliable price range + mobile scroll
 * ========================================================================== */

.rs-shop-filters {
    min-width: 0;
}

.rs-shop-filter-scroll,
.rs-shop-filter-panel {
    min-width: 0;
}

.rs-shop-filter-panel {
    background: #fff;
}

.rs-shop-filter-card {
    min-width: 0;
}

/* ----- Price filter: always-visible dual range ----- */
.rs-shop-price-filter {
    overflow: visible !important;
}

.rs-shop-price-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}

.rs-shop-price-value-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 42px;
    padding: 6px 9px;
    border: 1px solid rgba(75, 117, 61, .13);
    border-radius: 13px;
    background: #f8fbf5;
}

.rs-shop-price-value-box > span {
    color: #7d8c82;
    font-size: .62rem;
    font-weight: 800;
    white-space: nowrap;
}

.rs-shop-price-value {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #263b30;
    font-size: clamp(.62rem, .7vw, .7rem);
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
}

.rs-shop-range {
    --min-pos: 0%;
    --max-pos: 100%;
    position: relative;
    isolation: isolate;
    width: calc(100% - 8px);
    height: 46px;
    margin: 2px 4px 0;
    direction: ltr;
    overflow: visible !important;
}

.rs-shop-range::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    z-index: 0;
    height: 9px;
    border: 1px solid rgba(92, 130, 72, .09);
    border-radius: 999px;
    background: #dce8e2;
    box-shadow: inset 0 1px 2px rgba(34, 70, 43, .08);
    transform: translateY(-50%);
}

.rs-shop-range__track {
    display: none !important;
}

.rs-shop-range__fill {
    position: absolute;
    top: 50%;
    left: var(--min-pos) !important;
    right: calc(100% - var(--max-pos)) !important;
    z-index: 1;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #9dc248 0%, #739d20 100%);
    box-shadow: 0 1px 5px rgba(115, 157, 32, .18);
    transform: translateY(-50%);
    pointer-events: none;
}

.rs-shop-range input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    pointer-events: none;
    direction: ltr !important;
    -webkit-appearance: none;
    appearance: none;
    touch-action: pan-y;
}

.rs-shop-range input[data-rs-price-min] {
    z-index: 5;
}

.rs-shop-range input[data-rs-price-max] {
    z-index: 4;
}

.rs-shop-range input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 9px;
    border: 0;
    background: transparent;
}

.rs-shop-range input[type="range"]::-moz-range-track {
    width: 100%;
    height: 9px;
    border: 0;
    background: transparent;
}

.rs-shop-range input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -6.5px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #ff8c5e;
    box-shadow:
        0 0 0 1px rgba(255, 140, 94, .22),
        0 5px 13px rgba(255, 117, 72, .32);
    pointer-events: auto;
    cursor: grab;
    -webkit-appearance: none;
    appearance: none;
}

.rs-shop-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #ff8c5e;
    box-shadow:
        0 0 0 1px rgba(255, 140, 94, .22),
        0 5px 13px rgba(255, 117, 72, .32);
    pointer-events: auto;
    cursor: grab;
}

.rs-shop-range input[type="range"]:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(1.06);
}

.rs-shop-range input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 0 0 4px rgba(115, 157, 32, .18),
        0 5px 13px rgba(255, 117, 72, .30);
}

/* ----- Desktop: every filter in one single card ----- */
@media (min-width: 992px) {
    .rs-shop-filters {
        display: block !important;
        position: sticky !important;
        top: 92px !important;
        height: calc(100dvh - 108px) !important;
        max-height: calc(100dvh - 108px) !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.admin-bar .rs-shop-filters {
        top: 124px !important;
        height: calc(100dvh - 140px) !important;
        max-height: calc(100dvh - 140px) !important;
    }

    .rs-shop-filter-scroll {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 1px 7px 8px 1px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(115, 157, 32, .42) transparent;
    }

    .rs-shop-filter-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .rs-shop-filter-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .rs-shop-filter-scroll::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(115, 157, 32, .34);
    }

    .rs-shop-filter-panel {
        overflow: visible;
        border: 1px solid rgba(74, 119, 46, .15);
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 12px 34px rgba(34, 70, 43, .055);
    }

    .rs-shop-filter-card {
        margin: 0 !important;
        padding: 19px 17px !important;
        border: 0 !important;
        border-bottom: 1px solid #e8eee5 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .rs-shop-filter-card:first-child {
        border-radius: 22px 22px 0 0 !important;
    }

    .rs-shop-filter-panel > .rs-shop-reset {
        width: calc(100% - 28px);
        margin: 14px;
    }

    .rs-shop-filter-card .rs-shop-category-list {
        max-height: none !important;
        overflow: visible !important;
    }

    .rs-shop-filters__mobile-actions {
        display: none !important;
    }
}

/* ----- Mobile/tablet: true side drawer with one vertical scroll area ----- */
@media (max-width: 991.98px) {
    .rs-shop-filters,
    body.admin-bar .rs-shop-filters {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        inset: 0 0 0 auto !important;
        width: min(91vw, 410px) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        border-left: 1px solid rgba(72, 114, 50, .15) !important;
        border-radius: 24px 0 0 24px !important;
        background: #fff !important;
        box-shadow: -22px 0 62px rgba(18, 56, 34, .24) !important;
        z-index: 2147483600 !important;
        transform: translateX(105%) !important;
        visibility: hidden !important;
        transition:
            transform .32s cubic-bezier(.22, .75, .22, 1),
            visibility .32s !important;
    }

    .rs-shop-archive.is-filter-open .rs-shop-filters {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    .rs-shop-filters__mobile-head {
        display: flex !important;
        position: relative !important;
        top: auto !important;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 !important;
        padding:
            max(14px, env(safe-area-inset-top, 0px))
            15px
            13px !important;
        border-bottom: 1px solid #e7ede4;
        background: rgba(255, 255, 255, .985);
        z-index: 5;
    }

    .rs-shop-filters__mobile-head > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .rs-shop-filters__mobile-head strong {
        color: #304a39;
        font-size: .9rem;
        font-weight: 900;
    }

    .rs-shop-filters__mobile-head small {
        color: #87948b;
        font-size: .61rem;
        line-height: 1.4;
    }

    .rs-shop-filter-scroll {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        padding: 12px 12px 18px;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        scroll-behavior: smooth;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .rs-shop-filter-panel {
        width: 100%;
        overflow: visible;
        border: 1px solid rgba(74, 119, 46, .14);
        border-radius: 19px;
        background: #fff;
        box-shadow: 0 8px 25px rgba(34, 70, 43, .045);
    }

    .rs-shop-filter-card {
        margin: 0 !important;
        padding: 17px 14px !important;
        border: 0 !important;
        border-bottom: 1px solid #e8eee5 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .rs-shop-filter-card:first-child {
        border-radius: 19px 19px 0 0 !important;
    }

    .rs-shop-filter-panel > .rs-shop-reset {
        width: calc(100% - 24px);
        margin: 12px;
    }

    .rs-shop-filters .rs-shop-category-list {
        max-height: none !important;
        overflow: visible !important;
    }

    .rs-shop-filters__mobile-actions {
        display: flex;
        flex: 0 0 auto;
        padding:
            10px
            12px
            max(12px, env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #e6ece3;
        background: rgba(255, 255, 255, .985);
        box-shadow: 0 -8px 22px rgba(31, 68, 42, .06);
        z-index: 6;
    }

    .rs-shop-filter-done {
        width: 100%;
        min-height: 46px;
        border: 0;
        border-radius: 14px;
        background: linear-gradient(135deg, #739d20, #5f8718);
        color: #fff;
        font: inherit;
        font-size: .76rem;
        font-weight: 900;
        cursor: pointer;
        box-shadow: 0 8px 18px rgba(115, 157, 32, .20);
    }

    .rs-shop-filter-done:active {
        transform: scale(.985);
    }

    .rs-shop-price-values {
        gap: 6px;
    }

    .rs-shop-price-value-box {
        padding-inline: 7px;
    }

    .rs-shop-price-value {
        font-size: clamp(.58rem, 2.7vw, .68rem);
    }

    .rs-shop-range {
        width: calc(100% - 10px);
        margin-inline: 5px;
        height: 50px;
    }

    .rs-shop-range input[type="range"] {
        height: 50px;
    }

    .rs-shop-filter-toggle {
        width: auto !important;
        min-width: 72px;
    }
}

@media (max-width: 380px) {
    .rs-shop-filters,
    body.admin-bar .rs-shop-filters {
        width: min(94vw, 380px) !important;
    }

    .rs-shop-filter-scroll {
        padding-inline: 9px;
    }

    .rs-shop-filter-card {
        padding-inline: 11px !important;
    }

    .rs-shop-price-value-box {
        grid-template-columns: 1fr;
        gap: 2px;
        text-align: center;
    }

    .rs-shop-price-value-box > span,
    .rs-shop-price-value {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs-shop-filters,
    .rs-shop-filter-done,
    .rs-shop-range input[type="range"]::-webkit-slider-thumb {
        transition: none !important;
    }
}
