/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Nov 09 2026 | 16:55:08 */
/* =====================================================
   04 - CATEGORY TREE
   ===================================================== */


/* =====================================================
   BASE CATEGORY TREE
   ===================================================== */

.shop-category-tree {
    overflow-x: hidden;
}

.shop-category-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-category-tree li {
    position: relative;
    margin: 0;
    padding: 5px 0;
}

.shop-category-tree li ul {
    margin-top: 4px;
    padding-left: 20px;
}

.shop-category-tree a {
    color: var(--theme-text-color);
    text-decoration: none;
}

.shop-category-tree a:hover {
    color: var(--theme-link-hover-color);
}


/* =====================================================
   BASE EXPAND / COLLAPSE BUTTON
   ===================================================== */

.shop-category-tree .category-toggle {
    width: 22px;
    height: 22px;

    margin-right: 4px;
    padding: 0;

    border: 0;
    background: transparent;

    color: var(--theme-text-color);

    font-size: 20px;
    line-height: 20px;

    cursor: pointer;
}

.shop-category-tree li:not(.has-children) {
    padding-left: 26px;
}


/* =====================================================
   HOME PAGE - CATEGORY PANEL
   ===================================================== */

.home-category-panel {
    box-sizing: border-box;

    display: flex !important;
    flex-direction: column !important;

    min-height: 0;
    overflow: hidden;

    background: rgba(38, 61, 82, 0.92);

    border: 3px solid rgba(74, 101, 125, 0.95);
    border-radius: 8px;

    padding: 20px 18px !important;

    color: #fff;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.14);
}


/* =====================================================
   CATEGORY PANEL TITLE
   ===================================================== */

.home-category-panel h4 {
    flex: 0 0 auto;

    margin: 0 0 15px 0 !important;
    padding: 0 0 12px 4px;

    color: #fff;

    font-size: 20px;
    font-weight: 600;

    border-bottom: 2px solid rgba(255, 255, 255, 0.18);
}


/* =====================================================
   CATEGORY TREE INSIDE HOME PANEL
   ===================================================== */

.home-category-panel .shop-category-tree {
    flex: 1 1 0 !important;

    min-height: 0 !important;
    max-height: none !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    margin: 0;

    padding: 0 8px 0 4px;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.30) transparent;
}

.home-category-panel .shop-category-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-category-panel .shop-category-tree li {
    position: relative;

    margin: 0;

    padding-top: 6px;
    padding-bottom: 6px;
}

.home-category-panel .shop-category-tree li ul {
    margin-top: 5px;
    padding-left: 20px;
}


/* =====================================================
   CATEGORY LINKS INSIDE HOME PANEL
   ===================================================== */

.home-category-panel .shop-category-tree a {
    color: rgba(255, 255, 255, 0.88) !important;

    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;

    text-decoration: none !important;

    transition: color 0.15s ease;
}
.home-category-panel .shop-category-tree a:hover {
    color: #fff !important;
}


/* =====================================================
   EXPAND / COLLAPSE BUTTON INSIDE HOME PANEL
   ===================================================== */

.home-category-panel .category-toggle {
    width: 22px;
    height: 22px;

    margin-right: 5px;
    padding: 0;

    border: 0;
    background: transparent;

    color: rgba(255, 255, 255, 0.75);

    font-size: 20px;
    line-height: 20px;

    cursor: pointer;
}

.home-category-panel .category-toggle:hover {
    color: #fff;
}

.home-category-panel .shop-category-tree li:not(.has-children) {
    padding-left: 27px;
}


/* =====================================================
   HOME CATEGORY SCROLLBAR
   ===================================================== */

.home-category-panel .shop-category-tree::-webkit-scrollbar {
    width: 7px;
}

.home-category-panel .shop-category-tree::-webkit-scrollbar-track {
    background: transparent;
}

.home-category-panel .shop-category-tree::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.30);
    border-radius: 10px;
}

.home-category-panel .shop-category-tree::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.50);
}


/* =====================================================
   HIDE WOOCOMMERCE "UNCATEGORIZED"
   ===================================================== */

.shop-category-tree li:has(
    > a[href*="/product-category/uncategorized/"]
) {
    display: none;
}


/* =====================================================
   "ALL CATEGORIES" BUTTON
   ===================================================== */

.home-category-panel .wp-block-buttons {
    flex: 0 0 auto;

    margin-top: 20px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.home-category-panel .wp-block-button__link {
    border-radius: 6px;
}

/* =====================================================
   MOBILE - CATEGORY PANEL
   ===================================================== */

@media (max-width: 768px) {

    /* На мобильном панель больше НЕ flex-контейнер */
    .home-category-panel {
        display: block !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow: hidden !important;
    }

    /* Дерево категорий возвращаем в обычный document flow */
    .home-category-panel .shop-category-tree {
        display: block !important;

        flex: none !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: 300px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        padding: 0 8px 0 4px !important;
    }

    /* Кнопка идёт после дерева */
    .home-category-panel .wp-block-buttons {
        display: flex !important;

        margin: 16px 0 0 0 !important;
        padding: 0 !important;

        justify-content: center !important;
    }
}



/* Category icons */
.home-category-panel .shop-category-tree a .shop-category-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    max-width: none !important;

    object-fit: contain;
    display: inline-block;
    vertical-align: middle;

    margin-right: 6px;
}

/* =====================================================
   CATEGORY TREE - RTL (HEBREW)
   ===================================================== */

html[dir="rtl"] .shop-category-tree li ul {
    padding-left: 0 !important;
    padding-right: 20px !important;
}

html[dir="rtl"] .shop-category-tree li:not(.has-children) {
    padding-left: 0 !important;
    padding-right: 27px !important;
}

html[dir="rtl"] .home-category-panel .category-toggle {
    margin-right: 0 !important;
    margin-left: 5px !important;
}

html[dir="rtl"] .shop-category-tree a .shop-category-icon {
    margin-right: 0 !important;
    margin-left: 6px !important;
}


/* =====================================================
   CATEGORY TREE - ICON / ARROW / FALLBACK
   ===================================================== */

/* Categories without children and without an icon:
   show a dash instead of an empty space. */
.home-category-panel .shop-category-tree li:not(.has-children) {
    padding-left: 0 !important;
}

.home-category-panel .shop-category-tree li:not(.has-children):not(:has(> a .shop-category-icon))::before {
    content: "-";
    display: inline-block;
    width: 22px;
    margin-right: 5px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 20px;
    text-align: center;
    vertical-align: middle;
}

/* Leaf categories with an icon:
   reserve no additional space before the icon. */
.home-category-panel .shop-category-tree li:not(.has-children):has(> a .shop-category-icon) {
    padding-left: 0 !important;
}

/* RTL / Hebrew */
html[dir="rtl"] .home-category-panel .shop-category-tree li:not(.has-children) {
    padding-right: 0 !important;
}

html[dir="rtl"] .home-category-panel .shop-category-tree li:not(.has-children):not(:has(> a .shop-category-icon))::before {
    margin-right: 0;
    margin-left: 5px;
}

