/*
Theme Name: כשר סייל
Description: תבנית-בת ל-MW Commerce עבור koshersale.co.il - שחזור אחד-לאחד של האתר (Woodmart + Elementor + JetEngine) על מנוע MW, בלי אלמנטור ובלי ג'ט. המחקר: RESEARCH.md.
Template: mw-commerce
Author: Malki Weisbord
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: koshersale
*/

/* ==========================================================
   פונטים. 🪤 אלמנטור ווודמארט קוראים ל-Ploni ול-Ploni-Bold
   כשתי **משפחות** (לא משקלים של משפחה אחת), והתוכן שנשאר בעורך העמודים
   עדיין מפנה לשמות האלה - לכן כל שם מוגדר בנפרד, וגם משפחה אחת "Ploni"
   עם שני משקלים לקוד שלנו.
   ========================================================== */
/* Ploni (במקום Ploni של המקור, בקשת הלקוחה 15.10.2026). 'Ploni' - רגיל עד 500, חצי-מודגש 600-700,
   מודגש 800-900. 'Ploni-Bold' - חצי-מודגש בכל משקל (מחליף את Ploni-Bold, שהיה קובץ אחד) */
@font-face { font-family: 'Ploni'; src: url('assets/fonts/ploni-regular-aaa.woff2') format('woff2'), url('assets/fonts/ploni-regular-aaa.woff') format('woff'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'Ploni'; src: url('assets/fonts/ploni-demibold-aaa.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Ploni'; src: url('assets/fonts/ploni-ultrabold-aaa.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
@font-face { font-family: 'Ploni-Bold'; src: url('assets/fonts/ploni-demibold-aaa.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Cooperative'; src: url('assets/fonts/Cooperative-Regular.woff2') format('woff2'), url('assets/fonts/Cooperative-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
/* Heebo 700 - כותרות שלבי "תהליך רכישה" בפוטר (גוגל פונטס במקור, כאן מקומי) */
@font-face { font-family: 'Heebo'; src: url('assets/fonts/Heebo-700-hebrew.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; src: url('assets/fonts/Heebo-700-latin.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================
   טוקנים - מהקיט של אלמנטור (post 12) ומהגדרות וודמארט.
   הטיפוגרפיה ב-vw בדסקטופ ובפיקסלים מתחת ל-1024, בדיוק כמו במקור.
   ========================================================== */
:root {
    /* הפונט של האם (עגלה צדדית, כפתורים, התחברות) - גם הוא Ploni */
    --mw-font: 'Ploni', Arial, Helvetica, sans-serif;
    --ks-black: #090909;
    --ks-orange: #F26A21;
    --ks-peach: #FF9F6D;
    --ks-grey: #7A7A7A;
    --ks-green: #9BC329;
    --ks-bg: #F9F9F9;
    --ks-line: #7A7A7A2E;
    --ks-dark: #0B040C;

    --ks-f-head: 'Cooperative', 'Ploni', Arial, sans-serif;
    --ks-f-text: 'Ploni', Arial, Helvetica, sans-serif;

    --ks-fs-hero: 100px;
    --ks-fs-text: 1.1vw;
    --ks-fs-sub: 1.5vw;
    --ks-fs-h2: 2.8vw;
    --ks-fs-small: 1vw;
    --ks-fs-tiny: .9vw;
}
@media (max-width: 1024px) {
    :root { --ks-fs-hero: 80px; --ks-fs-text: 16px; --ks-fs-sub: 23px; --ks-fs-h2: 33px; --ks-fs-small: 16px; --ks-fs-tiny: 16px; }
}
@media (max-width: 767px) {
    :root { --ks-fs-hero: 55px; --ks-fs-text: 13px; --ks-fs-sub: 18px; --ks-fs-h2: 26px; --ks-fs-small: 12px; --ks-fs-tiny: 12px; }
}

body {
    font-family: var(--ks-f-text);
    color: var(--ks-black);
}

/* ==========================================================
   גלובלי - מהסניפט "HEDER CSS" (WPCode 75) שחל על כל האתר
   ========================================================== */
/* 🪤 וודמארט: scrollbar-gutter:stable שומר 9px לפס הגלילה המותאם - בלעדיו
   כל המיקומים באתר זזים ב-9px (רוחב התוכן במקור 1431 ב-1440) */
html { overflow-x: hidden !important; scrollbar-gutter: stable; }
body { overflow-x: clip !important; background: #F9F9F9; }
::selection { color: #fff; background-color: #EB5D1A; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { box-shadow: inset 0 0 5px grey; border-radius: 0; }
::-webkit-scrollbar-thumb { background: #EB5D1A; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #0B1126; }

/* ==========================================================
   הדר - נמדד מ-whb_header_587318 ב-1440 (רוחב תוכן 1431 בגלל פס הגלילה)
   ========================================================== */
.ks-header {
    position: relative;
    z-index: 60;
    background: #F9F9F9;
    font-family: var(--ks-f-text);
}
.ks-header a { text-decoration: none; }
.ks-header img { max-width: none; }

/* --- פס כתום מתחלף (block 102: testimonial-carousel, 2.5 שניות) --- */
.ks-strip {
    position: relative;
    height: 28px;
    background: var(--ks-orange);
    overflow: hidden;
}
.ks-strip__track { position: relative; height: 100%; }
.ks-strip__item {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--ks-fs-text);     /* 1.1vw = 15.84 ב-1440 */
    font-weight: 300;
    line-height: 1.1;
    color: var(--ks-black);
    transform: translateX(-100%);     /* RTL: השקופית הבאה נכנסת משמאל */
    transition: transform .5s ease;
}
.ks-strip__item.is-on { transform: translateX(0); }
.ks-strip__item.is-out { transform: translateX(100%); }

/* --- פס כהה: תפריט עליון / חיפוש + חשבון --- */
.ks-hmid {
    height: 55px;
    background: var(--ks-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 140px;             /* הטקסט הראשון מתחיל 140px מהקצה */
}
.ks-hnav .ks-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ks-hnav .ks-menu a {
    display: flex;
    align-items: center;
    height: 42px;
    font-size: 1vw;                   /* 14.4 ב-1440 (HEDER CSS: nav-link-text 1vw) */
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}
.ks-hnav--top .ks-menu a { color: #fff; }

.ks-hmid__tools {
    display: flex;
    align-items: center;
    gap: 49.5px;                      /* קצה הטופס (187) - קצה הגלולה (137.5) */
    height: 100%;
}
/* החיפוש: הטופס 220 רחב, השדה (min-width 20vw) גולש שמאלה ממנו - כמו במקור */
.ks-search {
    position: relative;
    width: 220px;
    height: 36px;
    margin: 0;
}
.ks-search__input {
    position: absolute;
    top: 0;
    right: 9px;
    width: 20vw;
    height: 36px;
    margin: 0;
    padding: 0 15px 0 65px;
    border: 0;
    border-radius: 35px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.ks-search__input::placeholder { color: rgb(100, 100, 100); opacity: 1; }
.ks-search__input:focus { box-shadow: 0 0 0 1px var(--ks-orange); }
.ks-search__input::-webkit-search-cancel-button { display: none; }
.ks-search__btn {
    position: absolute;
    top: 4px;
    left: -5px;
    width: 27px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 35px;
    background: var(--ks-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ks-search__btn img { width: 22px; height: 22px; }
.ks-search .mw-live-results { top: 42px; right: 9px; left: auto; width: 20vw; min-width: 280px; }

/* החשבון: גלולה (wd-tools-inner) 42 גובה, מסגרת לבנה 25%, ריחוף אפרסק */
.ks-account {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 42px;
    color: #fff;
    box-sizing: border-box;
    transition: background .3s, color .3s;
}
.ks-account img { width: 20px; height: 20px; }
.ks-account__txt { font-size: 12px; line-height: 1; white-space: nowrap; }
.ks-header .ks-account:hover { background: var(--ks-peach); color: #000; }

/* --- פס לבן: לוגו / קטגוריות / כלים --- */
.ks-hbot {
    position: relative;
    height: 73px;
    background: rgba(255, 255, 255, .98);
    display: flex;
    align-items: center;
    padding-right: 135.5px;           /* "סמארטפונים" מסתיים 135.5px מהקצה */
    padding-left: 10px;
}
/* הלוגו (block 94): אייקון 95px, translateY(-25) - גולש 40px לתוך הפס הכהה */
.ks-logo {
    position: absolute;
    top: -40px;
    right: 16px;
    width: 83px;
    height: 95px;
    display: block;
    z-index: 2;
}
.ks-logo svg { display: block; width: 83px; height: 95px; }

.ks-hnav--cats .ks-menu { gap: 14px; }
.ks-hnav--cats .ks-menu a {
    color: #333;
    border-radius: 30px;
    padding: 4px 0;
    transition: all .3s ease;
}
.ks-hnav--cats .ks-menu a:hover { background: #F9F9F9; }

.ks-hbot__tools {
    display: flex;
    align-items: center;
    margin-right: auto;
    height: 100%;
}
.ks-callbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    padding: 12px 24px;
    border: 1px solid var(--ks-black);
    border-radius: 100px;
    background: #fff;
    color: var(--ks-black);
    font-family: 'Ploni-Bold', var(--ks-f-text);
    font-weight: 700;
    font-size: var(--ks-fs-text);     /* 15.84 ב-1440 */
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background .3s, color .3s;
}
.ks-callbtn:hover { background: var(--ks-black); color: #fff; }

/* האייקון צמוד לימין התיבה: 10 מימין, 16 משמאל (46 = 10+20+16) */
.ks-list {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 46px;
    height: 40px;
    padding-right: 10px;
    box-sizing: border-box;
}
.ks-list__ico { position: relative; display: block; line-height: 0; }
.ks-list__ico img { width: 20px; height: auto; }
.ks-count {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--ks-orange);
    color: #fff;
    font-size: 9px;
    line-height: 15px;
    text-align: center;
    font-weight: 400;
}

.ks-cart {
    position: relative;
    width: 62px;
    height: 40px;
    margin: 0 10px 0 0;               /* הרווח (space 10) מהמועדפים */
    padding: 0 10px;
    border: 0;
    background: none;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.ks-cart__ico {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--ks-green);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}
.ks-cart:hover .ks-cart__ico { background: var(--ks-orange); }
.ks-cart__ico img { width: 20px; height: 20px; }
.ks-header .ks-count--cart {
    top: -4px;                        /* 3px מעל העיגול */
    right: 4px;                       /* 6px מעבר לעיגול (padding 10) */
    left: auto;
    min-width: 18px;
    height: 18px;
    background: #fff;
    color: var(--ks-orange);
    font-size: 11px;
    line-height: 18px;
    transform: none;
}

/* --- דביק (whb-sticked): fixed אחרי תחילת הגלילה, שורות 18/47/66 --- */
.ks-header-ph { height: 156px; }
.ks-header.is-stuck {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0px);
    left: 0;
    right: 0;
}
.ks-header.is-stuck .ks-strip { height: 18px; }
.ks-header.is-stuck .ks-hmid { height: 47px; }
.ks-header.is-stuck .ks-hbot { height: 66px; }
.ks-header.is-stuck .ks-logo { top: -43px; }

/* רכיבי מובייל - מוסתרים בדסקטופ */
.ks-burger, .ks-logo-mob { display: none; }

/* ----------------------------------------------------------
   שלוש רצועות רוחב בהדר - מבלוק <style> מותאם באתר המקור
   ("Header responsiveness for laptops"): מה שמוגדר למעלה = 1280-1440.
   מעל 1440 חוזרים ערכי וודמארט (gap 30, חשבון 18px, חיפוש 20vw),
   ומתחת ל-1280 הכל מתהדק (gap 10).
   ---------------------------------------------------------- */
@media (min-width: 1441px) {
    .ks-hnav--top .ks-menu { gap: 30px; }                  /* wd-gap-m */
    .ks-hnav--cats .ks-menu { gap: 5px; }                  /* style-bg: 20 - 15 */
    .ks-hnav--cats .ks-menu a { padding: 2px 10px; }       /* HEDER CSS */
    .ks-hbot { padding-right: 135px; }
    .ks-account__txt { font-size: 18px; }
    .ks-hmid__tools { gap: 40px; }
    .ks-search { width: 20vw; height: 35px; }
    .ks-search__input { right: 0; width: 100%; height: 35px; font-size: 14px; }
    .ks-search__btn { left: 4px; top: 4px; height: 27px; }
    .ks-search .mw-live-results { right: 0; width: 100%; }
}
@media (min-width: 1025px) and (max-width: 1279px) {
    .ks-hnav .ks-menu { gap: 10px; }
    .ks-hmid__tools { gap: 40px; }
    .ks-search { width: 190px; }
    .ks-search__input { right: 0; }
    .ks-search__btn { left: 4px; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
    .ks-hnav .ks-menu a { font-size: 10.5px; }             /* ה-1vw של HEDER CSS רק מ-1200 */
}

/* ==========================================================
   מובייל וטאבלט (≤1024) - וודמארט עובר להדר המובייל כבר ב-1024
   ========================================================== */
@media (max-width: 1024px) {
    .ks-header-ph { height: 84px; }
    .ks-strip, .ks-header.is-stuck .ks-strip { height: 18px; }
    .ks-header.is-stuck .ks-hbot { height: 66px; }
    .ks-strip__track { display: none; }   /* במקור הטקסט במובייל ריק */
    .ks-hmid, .ks-logo, .ks-hnav--cats, .ks-callbtn { display: none; }

    .ks-hbot {
        height: 66px;
        justify-content: center;
        padding: 0;
    }
    .ks-burger {
        display: block;
        align-self: flex-start;
        margin-top: 10px;
        width: 59px;
        padding: 0 10px;
        border: 0;
        background: none;
        color: var(--ks-orange);
        cursor: pointer;
        line-height: 0;
    }
    .ks-burger svg { width: 39px; height: 39px; fill: currentColor; }
    .ks-logo-mob {
        display: block;
        margin-right: 10px;
        margin-left: 53px;
        line-height: 0;
    }
    /* 🪤 במדידה הראשונה הלוגו עוד היה placeholder ברוחב 81 - אחרי טעינה
       הוא 49x56 (+5 ריפוד), וזה מה שקובע את רוחב האשכול הממורכז */
    .ks-logo-mob img { width: auto; height: 56px; padding: 5px 0; box-sizing: content-box; }
    .ks-hbot__tools { margin-right: 0; }
    .ks-list { width: 48px; }
    .ks-list__ico img { width: 22px; }
    .ks-cart { margin: 0; }
    .ks-cart__ico img { width: 22px; height: 22px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .ks-burger { width: 90px; padding: 0 20px; margin-top: 4px; }
    .ks-burger svg { width: 50px; height: 50px; }
}

/* ==========================================================
   תפריט מובייל (block 1164, off-canvas): פאנל 80vw מימין,
   פינות 20 בצד השמאלי, רקע rgba(0,0,0,.8)
   ========================================================== */
.ks-mobnav { position: fixed; inset: 0; z-index: 100000; }
.ks-mobnav__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    opacity: 0;
    transition: opacity .3s;
}
.ks-mobnav__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 100%;
    background: #fff;
    border-radius: 20px 0 0 20px;
    padding: 50px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-sizing: border-box;
}
@media (max-width: 767px) { .ks-mobnav__panel { width: 80vw; } }
.ks-mobnav.is-open .ks-mobnav__overlay { opacity: 1; }
.ks-mobnav.is-open .ks-mobnav__panel { transform: translateX(0); }
.ks-mobnav__close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    padding: 7.5px;
    border: 0;
    border-radius: 50%;
    background: rgba(122, 122, 122, .13);
    color: var(--ks-black);
    line-height: 0;
    cursor: pointer;
    transition: background .3s, color .3s;
}
.ks-mobnav__close:hover { background: var(--ks-orange); color: #fff; }
.ks-mobnav__close svg { width: 15px; height: 15px; fill: currentColor; }
/* לוגו + הדרן: צמודים לימין (לא ממורכזים), רווח 20; הדרן פיקסל מעל המרכז */
.ks-mobnav__brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    flex: 0 0 auto;
}
.ks-mobnav__brand img { width: 50px; height: 57px; display: block; }
.ks-mobnav__brand svg { height: 47px; width: auto; display: block; margin-top: -2px; }
.ks-mobnav__close:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.ks-mobnav__menu .ks-menu { margin: 0; padding: 0; list-style: none; }
.ks-mobnav__menu .ks-menu a {
    display: block;
    padding: 13px 25px;
    border-radius: 50px;
    color: var(--ks-black);
    font-size: 18px;
    line-height: 18px;
    text-decoration: none;
    transition: background .3s, color .3s;
}
.ks-mobnav__menu .ks-menu a:hover { background: var(--ks-black); color: #fff; }
.ks-callbtn--block {
    display: flex;
    width: 100%;
    margin: 0;
    font-size: 13px;
    box-sizing: border-box;
}

/* כפתורים ושדות לא יורשים פונט כברירת מחדל בדפדפן - יצאו ב-Arial */
button, input, select, textarea { font-family: inherit; }
