/* ==========================================================
   כשר סייל - חנות / קטגוריה / חיפוש מוצרים
   נמדד מהמקור (woodmart_layout 1342 + #pro-css) ב-1920/1440/1200/1024/375.
   נקודות שבירה של המקור: טאבלט ≤1024, טלפון ≤767.
   🪤 Ploni במשקל 600-900 = bold סינתטי במקור, ולכן Ploni.
   ========================================================== */
.ks-shop {
    --ks-imgh: 14vw;
    --ks-f-reg: 'Ploni', 'Ploni', Arial, sans-serif;
    --ks-f-syn: 'Ploni', 'Ploni', Arial, sans-serif;
    --ks-f-bold: 'Ploni-Bold', 'Ploni', Arial, sans-serif;
    font-family: var(--ks-f-reg);
    color: #090909;
}

/* ---------- ראש: פירורי לחם, כותרת, קטגוריות, מיון ---------- */
.ks-shop__head {
    width: 92.214%;
    margin-inline: auto;
    padding: 2vw 4vw 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: flex-start;
    gap: 10px 20px;
    box-sizing: border-box;
}
.ks-crumbs {
    width: 100%;
    font: 400 18px/1.6 var(--ks-f-reg);
    color: #090909;
    text-align: start;
}
.ks-crumbs a { color: #F26A21; text-decoration: none; }
.ks-crumbs a:hover { color: #090909; }
.ks-shop__title {
    width: 100%;
    margin: 0;
    font: 400 2.8vw/1.6 var(--ks-f-head, 'Cooperative', sans-serif);
    color: #090909;
    text-align: start;
    align-self: center;
}
.ks-shop__cats { width: 74%; max-width: 74%; padding-bottom: 18px; min-width: 0; }
.ks-shop__sort { width: 23%; max-width: 23%; align-self: center; }

/* רצועת הקטגוריות ([show_cats_images]) */
.ks-cats {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.15) transparent;
}
.ks-cats::-webkit-scrollbar { height: 4px; }
.ks-cats::-webkit-scrollbar-track { background: transparent; box-shadow: none; }
.ks-cats::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,.18); border-radius: 999px; }
.ks-cats:hover::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,.3); }
.ks-cats__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    min-width: max-content;
    margin: 0;
    padding: 0 10px;
    list-style: none;
}
.ks-cats__item { flex: 0 0 auto; margin: 0; }
.ks-cats__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 110px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font: 600 13px/18.2px var(--ks-f-syn);
}
.ks-cats__box {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    padding: 12px;
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.ks-cats__img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    margin: 0;
    mix-blend-mode: multiply;
    transition: transform .35s ease;
}
.ks-cats__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 1px 0;
    font-size: 13px;
    line-height: 1.25;
}
.ks-cats__item.is-active .ks-cats__link { color: rgba(51,51,51,.7); }
.ks-cats__item.is-active .ks-cats__box { border-color: #000; box-shadow: 0 8px 18px rgba(0,0,0,.10); }
.ks-cats__link:hover .ks-cats__box { border-color: #000; box-shadow: 0 8px 18px rgba(0,0,0,.10); transform: translateY(-2px); }
.ks-cats__link:hover .ks-cats__img { transform: scale(1.14); }

/* מיון */
.ks-shop .woocommerce-ordering { margin: 0; position: relative; }
.ks-shop .woocommerce-ordering select {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 15px 0 30px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 35px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23777' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat left 13px center;
    -webkit-appearance: none;
    appearance: none;
    font: 400 14px/1.6 var(--ks-f-reg);
    color: #090909;
    box-shadow: none;
    cursor: pointer;
    max-width: none;
}

/* כפתור "סינון ומיון" - רק במגירה */
.ks-shop__filterbtn { display: none; }

/* ---------- גוף: סינון (20%) + מוצרים (78%) ---------- */
.ks-shop__body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0 4vw 4vw;
}
.ks-shop__main { width: 78%; flex: 0 0 78%; min-width: 0; align-self: flex-start; }
.ks-shop__empty { font-size: 18px; padding: 20px 0; }

/* ---------- פאנל הסינון (JetSmartFilters) ---------- */
.ks-shop .ks-filters {
    position: sticky;
    top: 150px;
    width: 20%;
    flex: 0 0 20%;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 2em;
    box-shadow: none;
    box-sizing: border-box;
}
.ks-filters__bar { display: none; }
.ks-filters__title {
    margin: 0;
    font: 700 1.1vw/1 var(--ks-f-bold);
    color: #090909;
    text-align: start;
}
.ks-filters__search { margin: 0; }
.ks-filters__search input {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 35px;
    background: #fff;
    font: 300 1.1vw/1.1 var(--ks-f-reg);
    color: #090909;
    box-shadow: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.ks-filters__search input::placeholder { color: #090909; opacity: 1; }
.ks-filters__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ks-shop .ks-box { background: #fff; border: 0; border-radius: 18px; padding: 10px; }
.ks-filter__label {
    font: 900 .9vw/1.1 var(--ks-f-syn);
    color: #090909;
    text-align: start;
    padding: 0 0 6px;
}
.ks-range .ks-filter__label { margin: 7px 7px 18px 0; padding-bottom: 3%; }

/* טווח מחיר - מסילה 5px, עיגולים 12px באפרסק */
.ks-shop .ks-range .mw-price { display: block; padding: 0; gap: 0; }
.ks-shop .ks-range .mw-price__slider { height: 5px; margin: 0 0 20px; }
.ks-shop .ks-range .mw-price__slider::before { content: ''; position: absolute; inset: -6px 0; } /* שטח לחיצה */
.ks-shop .ks-range .mw-price__track { height: 5px; background: #F26A21; border-radius: 0; }
.ks-shop .ks-range .mw-price__track::before { background: #090909; border-radius: 0; }
.ks-shop .ks-range .mw-price__thumb {
    width: 12px;
    height: 12px;
    border: 0;
    background: #FF9F6D;
    box-shadow: none;
}
.ks-range__values {
    text-align: center;
    font: 300 1.1vw/1.1 var(--ks-f-reg);
    color: #090909;
}

/* תיבות סימון */
.ks-shop .ks-filters .mw-filter__options { display: block; max-height: none; overflow: visible; padding: 0; margin: 0; gap: 0; }
.ks-shop .ks-check {
    display: flex;
    align-items: flex-start;
    margin: 0 0 5px;
    padding: 0;
    min-height: 20.8px;
    cursor: pointer;
    color: #4E4E4E;
    background: none;
    gap: 0;
}
.ks-check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ks-check__dec {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 3px 0 0 7px;
    border: 1px solid #ccc;
    border-radius: 100px;
    background: #fff;
    box-sizing: border-box;
    position: relative;
}
.ks-check input:checked + .ks-check__dec { background: #F26A21; border-color: #0E0D0D; }
.ks-check input:checked + .ks-check__dec::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: translate(0, -1px) rotate(45deg);
}
.ks-check input:focus-visible + .ks-check__dec { outline: 2px solid #F26A21; outline-offset: 2px; }
.ks-check__name {
    font: 300 1vw/1.1 var(--ks-f-reg);
    color: #4E4E4E;
    align-self: center;
}
.ks-check__count {
    margin-inline-start: auto;
    padding: 0 5px;
    font: 100 13px/1.6 var(--ks-f-reg);
    color: #4E4E4E;
}
.ks-filter + .ks-filter { margin-top: -6px; } /* 14px בין הקבוצות (gap של 20 פחות 6) */

.ks-filters__apply { display: none; }
.ks-shop .ks-filters__clear {
    display: block;
    width: 100%;
    padding: 5px 20px;
    border: 0;
    border-radius: 100px;
    background: #FF9F6D;
    color: #090909;
    font: 700 1.1vw/1 var(--ks-f-bold);
    cursor: pointer;
    transition: background .2s;
}
.ks-shop .ks-filters__clear:hover { background: #F26A21; }

/* ---------- רשת המוצרים ---------- */
.ks-shop .ks-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
}

/* ---------- כרטיס המוצר (#pro-css) ---------- */
.ks-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    border: 1px solid #000;
    border-radius: 28px;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
    font: 400 18px/1.4 var(--ks-f-reg);
    color: #090909;
    text-align: start;
}
.ks-card__top {
    position: relative;
    height: var(--ks-imgh);
    padding: 1px;
    margin: 0 0 12px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 auto;
}
.ks-card__img { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.ks-card__img img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto;
}
.ks-card__sale {
    position: absolute;
    top: 11px;
    right: 11px;
    left: auto;
    z-index: 3;
    min-width: 50px;
    padding: 5px 10px;
    border-radius: 12px;
    background: rgb(226,107,52);
    color: #000;
    font: 600 12px/1.2 var(--ks-f-syn);
    text-align: center;
    box-sizing: border-box;
    direction: ltr;
}
.ks-card__sale--oos { background: rgb(226,107,52); color: rgb(5,5,5); }
.ks-card__btns {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    border-radius: 17.5px;
}
.ks-shop .ks-card__act {
    width: 50px;
    height: 45px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    color: #090909;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    min-width: 0;
    min-height: 0;
}
.ks-card__act svg { width: 20px; height: 20px; display: block; }
.ks-card__act:hover { color: #F26A21; }
.ks-card__act.is-active { color: #F26A21; }
.ks-card__act--wish.is-active svg { fill: currentColor; }

.ks-card__bottom > * { flex-shrink: 0; }
.ks-shop .ks-card__add .ks-qty { align-self: stretch; }
.ks-card__bottom {
    flex: 1 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 8px;
    padding: 0 15px 15px;
    background: #F9F9F9;
}
.ks-card__title {
    width: 100%;
    min-height: 24px;
    margin: 10px 0 6px;
    font: 700 16px/1.15 var(--ks-f-syn);
    color: #0B040C;
    text-align: start;
    white-space: normal;
}
.ks-card__title a { color: #000; text-decoration: none; }
.ks-card__var {
    display: block;
    width: fit-content;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 100px;
    background: #f2f2f2;
    color: #555;
    font: 500 13px/1.7 var(--ks-f-reg);
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}
.ks-card__price {
    display: block;
    flex-basis: 100%;
    width: 100%;
    margin: 0 0 10px;
    font: 600 18px/1.4 var(--ks-f-syn);
    color: #F26A21;
    text-align: start;
}
.ks-card__price .amount { color: #000; font: 700 15px/1.4 var(--ks-f-syn); }
.ks-card__price del { opacity: .6; color: #000; }
.ks-card__price ins { text-decoration: none; background: none; }

.ks-card__add {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
}
.ks-shop .ks-qty { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ks-shop .ks-qty .mw-qty__btn {
    width: 28px !important;
    height: 25px !important;
    padding: 0 2px !important;
    border: 0;
    border-radius: 6px;
    background: #f7f4e3;
    color: #000;
    font: 600 14px/1 var(--ks-f-syn);
    box-shadow: none;
}
.ks-shop .ks-qty .mw-qty__input {
    width: 42px !important;
    max-width: 42px !important;
    height: 36px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #000 !important;
    font: 600 14px/1.4 var(--ks-f-syn) !important;
    text-align: center;
}
.ks-shop .ks-card__btn,
.ks-shop .ks-card__add .mw-buy-btn.ks-card__btn {
    flex: 1 1 100px;
    min-width: 100px;
    width: auto;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px !important;
    background: #F26A20;
    color: #000;
    font: 700 14px/1 var(--ks-f-bold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: none;
    filter: none;
    transition: background .25s, color .25s;
}
.ks-card__btn .mw-buy-btn__text { padding: 5px 14px; font-size: 14px; line-height: 1; white-space: nowrap; }
.ks-shop .ks-card__btn:hover { background: #74a32f; color: #fff; filter: none; }
.ks-shop .ks-card__btn.is-added { background: #74a32f; color: #fff; }
.ks-card .mw-buy-count { display: none !important; }

/* טען מוצרים נוספים */
.ks-shop .mw-more { padding: 30px 0 0; display: flex; justify-content: center; }
.ks-shop .mw-more__btn {
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding: 5px 20px;
    border: 2px solid rgba(0,0,0,.106);
    border-radius: 0;
    background: transparent;
    color: #F26A21;
    font: 600 13px/1.2 var(--ks-f-syn);
    box-shadow: none;
    cursor: pointer;
}
.ks-shop .mw-more__btn:hover { background: transparent; color: #090909; border-color: rgba(0,0,0,.2); }

/* תיאור הקטגוריה */
.ks-shop__desc {
    padding: 0 5%;
    font: 300 1vw/1.1 var(--ks-f-reg);
    color: #090909;
    text-align: start;
}
.ks-shop__desc p { margin: 0 0 20px; }
.ks-shop__desc p:last-child { margin-bottom: 0; }
.ks-shop__desc a { color: #F26A21; }

@media (min-width: 1024px) {
    .ks-card__btn .mw-buy-btn__text { font-size: 1vw; line-height: 1; }
}

/* ==========================================================
   טאבלט ≤1024: 3 בשורה, הסינון במגירה משמאל (300px)
   ========================================================== */
@media (max-width: 1024px) {
    .ks-shop__head { padding: 3%; }
    .ks-shop__title { font-size: 33px; line-height: 1.6; }
    .ks-shop__cats { width: 75%; max-width: 75%; }
    .ks-shop__body { padding: 3%; }
    .ks-shop__main { width: 100%; flex-basis: 100%; padding: 3%; box-sizing: border-box; }
    .ks-shop .ks-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .ks-shop .ks-shop__filterbtn {
        display: inline-flex;
        align-items: center;
        align-self: center;
        margin: 0;
        padding: 7px 12.4px 7px 7px;
        border: 0;
        border-radius: 22px;
        background: #D8D8D8;
        color: #090909;
        font: 700 16px/28.8px var(--ks-f-bold);
        cursor: pointer;
        box-shadow: none;
        min-height: 0;
    }

    .ks-shop .ks-filters {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        inset-inline-start: auto;
        width: 300px;
        height: 100dvh;
        max-height: none;
        z-index: 100001;
        padding: 0;
        gap: 20px;
        background: #fff;
        border-radius: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.25,.8,.3,1);
    }
    html[dir] .ks-shop .ks-filters.is-open { transform: translateX(0) !important; }
    .ks-shop .mw-filters-overlay { z-index: 100000; }
    /* ראש המגירה של וודמארט: "סגור" + X משמאל, קו מתחת */
    .ks-filters__bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex: 0 0 auto;
        padding: 20px 15px;
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,.1);
    }
    .ks-shop .ks-filters__close {
        display: inline-flex;
        align-items: center;
        gap: 5.4px;
        height: 25px;
        margin: 0;
        padding: 0;
        background: none;
        border: 0;
        color: #333;
        font: 600 18px/1 var(--ks-f-syn);
        cursor: pointer;
        box-shadow: none;
        min-height: 0;
    }
    .ks-filters__close svg { width: 20px; height: 20px; display: block; }
    .ks-filters__close:hover { color: #F26A21; }
    .ks-filters__title, .ks-filters__search input, .ks-range__values { font-size: 16px; }
    .ks-filter__label { font-size: 16px; }
    .ks-check__name { font-size: 16px; }
    .ks-filters__apply {
        display: block;
        width: 100%;
        padding: 10px 20px;
        border: 0;
        border-radius: 100px;
        background: #F26A21;
        color: #fff;
        font: 700 16px/1 var(--ks-f-bold);
        cursor: pointer;
    }
    .ks-shop .ks-filters__clear { display: none; }

    .ks-card__btns { top: 10px; }
    .ks-shop .ks-card__act--compare { display: none; }
    .ks-shop .ks-card__act { width: 35px; height: 35px; }
    .ks-card__act svg { width: 14px; height: 14px; }

    .ks-shop__desc { font-size: 16px; }
}

/* ==========================================================
   טלפון ≤767: 2 בשורה, בלי בורר כמות, מיון = אייקון
   ========================================================== */
@media (max-width: 767px) {
    .ks-shop { --ks-imgh: 135px; }
    .ks-shop__head { width: 100%; }
    .ks-shop__title { font-size: 26px; line-height: 1.1; }
    .ks-shop__cats { width: 100%; max-width: 100%; }
    .ks-cats__link { width: 110px; gap: 8px; font-size: 12px; line-height: 15px; }
    .ks-cats__box { width: 96px; height: 96px; }
    .ks-cats__name { font-size: 12px; }

    .ks-shop .woocommerce-ordering {
        width: 30px;
        height: 30px;
        margin-inline-start: 0;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23090909' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 20V4M3 8l4-4 4 4M17 4v16M13 16l4 4 4-4'/%3E%3C/svg%3E") no-repeat center;
    }
    .ks-shop .woocommerce-ordering select {
        position: absolute;
        inset: 0;
        width: 30px;
        height: 30px;
        padding: 0;
        opacity: 0;
        font-size: 16px;
    }
    .ks-shop .ks-shop__filterbtn {
        width: 90px;
        padding: 0 19.4px 5px 6px;
        border-radius: 0 22px 22px 0;
        font-size: 13px;
        justify-content: flex-start;
    }

    .ks-shop .ks-filters { padding: 18px; gap: 5px; }
    .ks-filters__bar { margin: -18px -18px 0; }
    .ks-filters__title { text-align: center; font-size: 13px; }
    .ks-filters__search input, .ks-range__values { font-size: 13px; }
    .ks-filter__label { font-size: 12px; }
    .ks-check__name { font-size: 14px; }
    .ks-filters__apply { font-size: 13px; margin-top: 10px; }
    .ks-filter + .ks-filter { margin-top: 9px; }

    .ks-shop .ks-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ks-card { gap: 10px; border-radius: 24px; font-size: 16.2px; }
    .ks-card__bottom { flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: 0 4px 4px; }
    .ks-card__bottom > * { flex-basis: auto; }
    .ks-card__price { font-size: 16.2px; }
    .ks-card__sale { font-size: 10px; padding: 5px; min-width: 40px; }
    .ks-shop .ks-qty { display: none; }
    .ks-shop .ks-card__btn { width: 100%; flex: 1 1 100%; }

    .ks-shop__desc { font-size: 12px; }
}
