/* ============================================================
   Liberty Product Categories - כל הקלאסים בתחילית lpc-
   כדי שלא יתנגש עם עיצוב קיים (.liberty-product-cats / .category-item)
   ============================================================ */

.lpc-wrap {
    direction: rtl;
    max-width: 480px;
    margin: 0 auto;
    padding: 12px;
    font-family: inherit;
    display: block;
}

/* כותרת הסינון */
.lpc-wrap .lpc-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #b9c4f5;
    color: #1f2a63;
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
}

.lpc-wrap .lpc-title {
    line-height: 1.2;
}

.lpc-wrap .lpc-icon {
    display: inline-flex;
    color: #1f2a63;
}

/* כרטיס קטגוריה */
.lpc-wrap .lpc-item {
    margin-bottom: 16px;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
}

.lpc-wrap .lpc-item .lpc-link {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 10px 28px;
    min-height: 0;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}

.lpc-wrap .lpc-item .lpc-link:hover {
    border-color: #9aa8e8;
    box-shadow: 0 4px 14px rgba(31, 42, 99, .12);
    transform: translateY(-2px);
}

/* קטגוריה פעילה (כמו "כסא גלגלים" בתמונה) */
.lpc-wrap .lpc-item.lpc-active .lpc-link {
    border-color: #8593d8;
    box-shadow: 0 2px 10px rgba(31, 42, 99, .10);
}

/* שם הקטגוריה */
.lpc-wrap .lpc-item .lpc-name {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2a63;
    line-height: 1.2;
    flex: 1;
    text-align: center;
    max-width: none;
    background: transparent;
}

/* התמונה בקצה השמאלי */
.lpc-wrap .lpc-item .lpc-link img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    max-width: none;
    max-height: none;
}

/* רספונסיב */
@media (max-width: 520px) {
    .lpc-wrap .lpc-header {
        font-size: 20px;
        padding: 16px 20px;
    }
    .lpc-wrap .lpc-item .lpc-name {
        font-size: 20px;
    }
    .lpc-wrap .lpc-item .lpc-link img {
        width: 58px;
        height: 58px;
    }
}

/* ============================================================
   כפתור נייד + פופאפ קטגוריות
   ============================================================ */

/* הכפתור מוסתר כברירת מחדל (מחשב) */
.lpc-mobile-toggle {
    display: none !important;
}

/* מבטל גלילת רקע כשהפופאפ פתוח */
html.lpc-no-scroll,
html.lpc-no-scroll body {
    overflow: hidden;
}

/* ---- נייד ---- */
@media (max-width: 767px) {
    /* מסתירים את הרשימה הרגילה */
    .lpc-inline {
        display: none !important;
    }

    /* מציגים את הכפתור */
    .lpc-mobile-toggle {
        direction: rtl;
        display: flex !important;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        background: #b9c4f5 !important;
        color: #1f2a63 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 16px;
        padding: 6px 9px 6px 9px !important;
        font-size: 20px !important;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
        transition: background .2s;
    }

    .lpc-mobile-toggle:hover {
        background: #a7b4f0 !important;
    }

    .lpc-mobile-toggle .lpc-mobile-toggle-text {
        color: #1f2a63 !important;
    }

    .lpc-mobile-toggle .lpc-icon {
        color: #1f2a63 !important;
        display: inline-flex;
    }
}

/* ---- הפופאפ ---- */
.lpc-modal {
    direction: rtl;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.lpc-modal[hidden] {
    display: none;
}

.lpc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

.lpc-modal.lpc-modal-open .lpc-modal-overlay {
    opacity: 1;
}

.lpc-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: #f8f6f4;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .25s ease;
}

.lpc-modal.lpc-modal-open .lpc-modal-panel {
    transform: translateY(0);
}

.lpc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(31, 42, 99, .25);
    flex-shrink: 0;
}

.lpc-modal-head .lpc-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2a63;
}

.lpc-modal .lpc-modal-close {
    background: #b9c4f5 !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #1f2a63 !important;
    cursor: pointer;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.lpc-modal .lpc-modal-close:hover {
    background: #a7b4f0 !important;
    color: #1f2a63 !important;
}

.lpc-modal-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* פריטי הקטגוריה בתוך הפופאפ - אותו עיצוב כמו הרשימה */
.lpc-modal-body .lpc-item {
    margin-bottom: 14px;
}

.lpc-modal-body .lpc-item:last-child {
    margin-bottom: 0;
}

.lpc-modal-body .lpc-item .lpc-link {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 10px 24px;
    min-height: 0;
    text-decoration: none;
}

.lpc-modal-body .lpc-item.lpc-active .lpc-link {
    border-color: #8593d8;
}

.lpc-modal-body .lpc-item .lpc-name {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2a63;
    line-height: 1.2;
    flex: 1;
    text-align: center;
    max-width: none;
    background: transparent;
}

.lpc-modal-body .lpc-item .lpc-link img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    max-width: none;
    max-height: none;
}

/* במחשב הפופאפ אף פעם לא נפתח */
@media (min-width: 768px) {
    .lpc-modal {
        display: none !important;
    }
}
