/* ==========================================
CATEGORY PAGE V2
========================================== */

:root{

    --primary:#16a34a;

    --bg:#f7f8fa;

    --card:#ffffff;

    --text:#111827;

    --border:#ececec;

    --shadow:0 3px 12px rgba(0,0,0,.06);

}

body{

    margin:0;

    background:var(--bg);

    overflow:hidden;

}

.app{

    height:100vh;

    display:flex;

    flex-direction:column;

    background:var(--bg);

}

/* ==========================================
HEADER
========================================== */

.category-header{

    position:sticky;

    top:0;

    z-index:100;

    background:#fff;

    border-bottom:1px solid var(--border);

}

.header-top{

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:14px 16px;

}

.back-btn{

    width:42px;

    height:42px;

    border:none;

    background:#f3f4f6;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    cursor:pointer;

}

.back-btn i{

    font-size:24px;

    color:#111;

}

.header-title{

    flex:1;

    padding:0 12px;

}

.header-title h2{

    font-size:20px;

    font-weight:700;

    margin:0;

    color:#111;

}

.header-title p{

    margin-top:3px;

    font-size:13px;

    color:#666;

}

.header-actions{

    display:flex;

    gap:10px;

}

.icon-btn{

    width:42px;

    height:42px;

    border:none;

    background:#f3f4f6;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    cursor:pointer;

}

.icon-btn i{

    font-size:21px;

}

/* ==========================================
SEARCH
========================================== */

.search-wrapper{

    padding:0 16px 16px;

}

.search-box{

    height:52px;

    display:flex;

    align-items:center;

    gap:10px;

    background:#f4f5f7;

    border-radius:14px;

    padding:0 16px;

}

.search-box input{

    flex:1;

    border:none;

    background:none;

    outline:none;

    font-size:15px;

}

.search-box i{

    color:#777;

    font-size:20px;

}

/* ==========================================
BODY
========================================== */

.category-container{

    flex:1;

    display:flex;

    overflow:hidden;

}

/* ==========================================
LEFT SIDEBAR
========================================== */

.category-sidebar{

    width:95px;

    background:#fafafa;

    border-right:1px solid var(--border);

    overflow-y:auto;

    padding:8px;

}

.category-sidebar::-webkit-scrollbar{

    display:none;

}

.category-item{

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:6px;

    padding:12px 6px;

    border-radius:14px;

    margin-bottom:8px;

    cursor:pointer;

    transition:.25s;

}

.category-item.active{

    background:#e8f8ec;

}

.category-item img{

    width:52px;

    height:52px;

    object-fit:contain;

}

.category-item span{

    font-size:11px;

    text-align:center;

    color:#444;

}

/* ==========================================
RIGHT SIDE
========================================== */

.products-wrapper{

    flex:1;

    overflow-y:auto;

    padding:14px;

}

.products-wrapper::-webkit-scrollbar{

    width:4px;

}

.products-wrapper::-webkit-scrollbar-thumb{

    background:#ddd;

    border-radius:20px;

}


.products-section{
    flex:1;
    overflow-y:auto;
    padding-bottom:120px; /* Floating cart ke liye space */
}
/* ==========================================
FILTER
========================================== */

.filter-bar{

    display:flex;

    gap:10px;

    overflow-x:auto;

    padding-bottom:12px;

    margin-bottom:12px;

    scrollbar-width:none;

}

.filter-bar::-webkit-scrollbar{

    display:none;

}

.filter-chip{

    border:none;

    background:#fff;

    border:1px solid #e5e7eb;

    border-radius:30px;

    padding:8px 16px;

    white-space:nowrap;

    cursor:pointer;

    font-size:13px;

    font-weight:600;

}

.filter-chip.active{

    background:var(--primary);

    color:#fff;

}

.sort-btn{

    display:flex;

    align-items:center;

    gap:6px;

    padding:8px 16px;

    border-radius:30px;

    background:#fff;

    border:1px solid #ddd;

    margin-left:auto;

    cursor:pointer;

}

/* ==========================================
CATEGORY INFO
========================================== */

.category-info{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:16px;

}

.category-info h3{

    font-size:22px;

    font-weight:700;

    color:#111;

}

.category-info p{

    margin-top:4px;

    font-size:13px;

    color:#777;

}

/* ==========================================
PRODUCT GRID
========================================== */

.product-grid{

    display:grid;

    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:14px;

    padding-bottom:120px;

}

/* ==========================================
PRODUCT CARD
========================================== */



/* ==========================================
FLOATING CART
========================================== */

.floating-cart-bar{

    position:fixed;

    left:12px;

    right:12px;

    bottom:72px;

    width:auto;

    max-width:460px;

    margin:auto;

    height:62px;

    background:#16a34a;

    border-radius:16px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 18px;

    color:#fff;

    box-shadow:0 12px 35px rgba(0,0,0,.22);

    z-index:9999;

}

.floating-cart-bar a{

    color:#fff;

    text-decoration:none;

    font-weight:700;

}

/* ==========================================
LOADER
========================================== */

.page-loader{

    position:fixed;

    inset:0;

    background:#fff;

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:9999;

}



.loader-spinner{

    width:42px;

    height:42px;

    border:4px solid #e5e5e5;

    border-top:4px solid #16a34a;

    border-radius:50%;

    animation:spin .8s linear infinite;

}

@keyframes spin{

    to{

        transform:rotate(360deg);

    }

}

/* ==========================================
EMPTY STATE
========================================== */

.empty-state{

    text-align:center;

    padding:60px 20px;

}

.empty-state img{

    width:170px;

    margin:auto;

}

.empty-state h3{

    margin-top:18px;

    font-size:22px;

}

.empty-state p{

    color:#777;

    margin-top:8px;

}

/* ==========================================
RESPONSIVE
========================================== */

@media(max-width:480px){

    .category-sidebar{
        width:82px;
    }

    .product-grid{
        gap:10px;
    }

}


/* ==========================================
PREMIUM HEART
========================================== */



/* ==========================================
CATEGORY ACTIVE
========================================== */

.category-item{

    position:relative;

}

.category-item.active{

    background:#fff;

    box-shadow:0 6px 18px rgba(0,0,0,.08);

}

.category-item.active::before{

    content:"";

    position:absolute;

    left:-8px;

    top:15px;

    width:4px;

    height:45px;

    border-radius:20px;

    background:#16a34a;

}

/* ==========================================
FILTER
========================================== */

.filter-chip{

    transition:.25s;

}

.filter-chip:hover{

    background:#16a34a;

    color:#fff;

}

/* ==========================================
SCROLLBAR
========================================== */

.products-wrapper{

    scroll-behavior:smooth;

}

.products-wrapper::-webkit-scrollbar{

    width:5px;

}

.products-wrapper::-webkit-scrollbar-thumb{

    background:#d7d7d7;

    border-radius:50px;

}

/* ==========================================
DARK MODE
========================================== */

body.dark{

    background:#111827;

}

body.dark .category-header{

    background:#111827;

    border-color:#222;

}

body.dark .header-title h2{

    color:#fff;

}

body.dark .header-title p{

    color:#bdbdbd;

}

body.dark .search-box{

    background:#1f2937;

}

body.dark .search-box input{

    color:#fff;

}

body.dark .search-box i{

    color:#cfcfcf;

}

body.dark .category-sidebar{

    background:#181818;

    border-color:#222;

}

body.dark .category-item span{

    color:#fff;

}







body.dark .icon-btn{

    background:#1f2937;

    color:#fff;

}

body.dark .floating-cart-bar{

    background:#16a34a;

}

/* ==========================================
TABLET
========================================== */

@media(min-width:768px){

    .category-sidebar{

        width:110px;

    }

    .product-grid{

        grid-template-columns:repeat(3,1fr);

    }

}

/* ==========================================
DESKTOP
========================================== */

@media(min-width:1200px){

    .app{

        max-width:1400px;

    }

    .product-grid{

        grid-template-columns:repeat(4,1fr);

    }

}