/* ===================================================== */
/* 🔥 CATEGORY MODULE CSS */
/* 🔥 FINAL STABLE VERSION */
/* ===================================================== */

/* ===================================================== */
/* 🔥 RESET */
/* ===================================================== */

*{

    box-sizing:border-box;

}

/* ===================================================== */
/* 🔥 CATEGORY PAGE */
/* ===================================================== */

.category-page{

    width:100%;

    min-height:100vh;

    background:#f5f5f5;

}

/* ===================================================== */
/* 🔥 CATEGORY LAYOUT */
/* ===================================================== */

.category-layout{

    width:100%;

    max-width:1400px;

    margin:0 auto;

    padding:16px;

    display:flex;

    gap:20px;

    align-items:flex-start;

}

/* ===================================================== */
/* 🔥 SIDEBAR */
/* ===================================================== */

.category-sidebar-wrap{

    width:280px;

    min-width:280px;

    background:#fff;

    border-radius:14px;

    padding:16px;

    box-shadow:0 2px 8px rgba(0,0,0,.06);

    overflow:hidden;

}

/* ===================================================== */
/* 🔥 SIDEBAR TITLE */
/* ===================================================== */

.category-sidebar-title{

    font-size:22px;

    font-weight:700;

    margin-bottom:18px;

    color:#111;

}

/* ===================================================== */
/* 🔥 SIDEBAR ITEM */
/* ===================================================== */

.category-sidebar-item{

    margin-bottom:10px;

}

/* ===================================================== */
/* 🔥 SIDEBAR LINK */
/* ===================================================== */

.category-sidebar-link{

    width:100%;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:10px;

    padding:12px 14px;

    border-radius:10px;

    background:#f7f7f7;

    color:#111;

    text-decoration:none;

    font-size:15px;

    font-weight:600;

    transition:all .25s ease;

    overflow:hidden;

}

.category-sidebar-link:hover{

    background:#ffcc00;

}

/* ===================================================== */
/* 🔥 ACTIVE */
/* ===================================================== */

.category-sidebar-link.active-category,

.category-sidebar-link.tree-active{

    background:#ffcc00;

    color:#000;

}

/* ===================================================== */
/* 🔥 CHILDREN */
/* ===================================================== */

.category-sidebar-children{

    display:none;

    margin-top:8px;

    margin-left:10px;

    padding-left:10px;

    border-left:2px solid #eee;

}

.category-sidebar-children.expanded{

    display:block;

}

/* ===================================================== */
/* 🔥 CHILD LINK */
/* ===================================================== */

.category-sidebar-child{

    display:flex;

    justify-content:space-between;

    padding:8px 10px;

    border-radius:8px;

    text-decoration:none;

    color:#444;

    font-size:14px;

    margin-bottom:4px;

    transition:.25s;

}

.category-sidebar-child:hover{

    background:#f3f3f3;

    color:#000;

}

/* ===================================================== */
/* 🔥 TREE TOGGLE */
/* ===================================================== */

[data-tree-toggle]{

    cursor:pointer;

    user-select:none;

}

/* ===================================================== */
/* 🔥 MAIN */
/* ===================================================== */

.category-main{

    flex:1;

    min-width:0;

}

/* ===================================================== */
/* 🔥 CATEGORY BAR */
/* ===================================================== */

.category-bar-wrap{

    position:relative;

    margin-bottom:20px;

}

.category-bar{

    display:flex;

    gap:12px;

    overflow-x:auto;

    scroll-behavior:smooth;

    scrollbar-width:none;

    padding-bottom:4px;

}

.category-bar::-webkit-scrollbar{

    display:none;

}

/* ===================================================== */
/* 🔥 CATEGORY LINK */
/* ===================================================== */

.cat-link{

    flex-shrink:0;

    display:flex;

    align-items:center;

    justify-content:center;

    padding:10px 18px;

    border-radius:999px;

    background:#fff;

    color:#111;

    text-decoration:none;

    font-size:15px;

    font-weight:600;

    white-space:nowrap;

    transition:.25s;

    box-shadow:0 2px 6px rgba(0,0,0,.05);

}

.cat-link:hover,

.cat-link.active{

    background:#ffcc00;

    color:#000;

}

/* ===================================================== */
/* 🔥 SCROLL BUTTON */
/* ===================================================== */

.cat-scroll-btn{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    width:36px;

    height:36px;

    border:none;

    border-radius:50%;

    background:#fff;

    box-shadow:0 2px 8px rgba(0,0,0,.15);

    cursor:pointer;

    z-index:5;

}

.cat-scroll-btn.prev{

    left:-10px;

}

.cat-scroll-btn.next{

    right:-10px;

}

.cat-scroll-btn.disabled{

    opacity:.4;

    pointer-events:none;

}

/* ===================================================== */
/* 🔥 CATEGORY GRID */
/* ===================================================== */

.category-grid{

    display:grid;

    grid-template-columns:

        repeat(auto-fill,minmax(240px,1fr));

    gap:18px;

}

/* ===================================================== */
/* 🔥 CATEGORY CARD */
/* ===================================================== */

.category-card{

    background:#fff;

    border-radius:14px;

    overflow:hidden;

    box-shadow:0 2px 8px rgba(0,0,0,.06);

    transition:transform .25s ease;

}

.category-card:hover{

    transform:translateY(-4px);

}

/* ===================================================== */
/* 🔥 CATEGORY IMAGE */
/* ===================================================== */

.category-card-image{

    width:100%;

    height:200px;

    object-fit:cover;

    display:block;

    background:#fff;

}

/* ===================================================== */
/* 🔥 CATEGORY BODY */
/* ===================================================== */

.category-card-body{

    padding:14px;

}

.category-card-title{

    font-size:18px;

    font-weight:700;

    color:#111;

    margin-bottom:8px;

}

.category-card-count{

    font-size:14px;

    color:#777;

}

/* ===================================================== */
/* 🔥 HOME CATEGORY TREE */
/* ===================================================== */

.home-category-tree{

    display:flex;

    flex-direction:column;

    gap:20px;

    margin-top:20px;

}

/* ===================================================== */
/* 🔥 HOME CATEGORY BLOCK */
/* ===================================================== */

.home-category-block{

    background:#fff;

    border-radius:14px;

    padding:18px;

    box-shadow:0 2px 8px rgba(0,0,0,.06);

}

/* ===================================================== */
/* 🔥 HOME CATEGORY PARENT */
/* ===================================================== */

.home-category-parent{

    margin-bottom:16px;

}

.home-category-parent a{

    text-decoration:none;

    color:#111;

    font-size:28px;

    font-weight:700;

}

/* ===================================================== */
/* 🔥 HOME CHILDREN */
/* ===================================================== */

.home-category-children{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}

/* ===================================================== */
/* 🔥 HOME CHILD */
/* ===================================================== */

.home-category-child{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:10px 18px;

    border-radius:999px;

    background:#f1f1f1;

    color:#111;

    text-decoration:none;

    font-size:15px;

    font-weight:600;

    transition:.25s;

}

.home-category-child:hover{

    background:#ffcc00;

}

/* ===================================================== */
/* 🔥 EMPTY */
/* ===================================================== */

.empty-category-state{

    padding:40px;

    text-align:center;

    font-size:18px;

    font-weight:600;

    color:#777;

}

/* ===================================================== */
/* 🔥 MOBILE */
/* ===================================================== */

@media(max-width:768px){

    .category-layout{

        flex-direction:column;

        padding:10px;

    }

    .category-sidebar-wrap{

        position:fixed;

        top:0;

        left:-320px;

        width:280px;

        height:100vh;

        z-index:999;

        overflow-y:auto;

        transition:left .3s ease;

        border-radius:0;

    }

    .category-sidebar-wrap.mobile-open{

        left:0;

    }

    .category-grid{

        grid-template-columns:

            repeat(2,1fr);

        gap:12px;

    }

    .category-card-image{

        height:150px;

    }

    .home-category-parent a{

        font-size:22px;

    }

    .home-category-child{

        font-size:14px;

        padding:8px 14px;

    }

    .cat-scroll-btn{

        display:none;

    }

}

/* ===================================================== */
/* 🔥 READY */
/* ===================================================== */

.category-css-ready{

    display:none;

}