/* =====================================================
   GLOBAL RESET
===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial,sans-serif;
    background:#f5f6fa;
    color:#222;

    /* BODY STARTS AFTER NAVBAR */
    padding-top:90px;

    overflow-x:hidden;
}


/* =====================================================
   LAYOUT
===================================================== */

.shop-container{
    display:flex;
    min-height:100vh;
}


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

.sidebar{
    width:320px;
    background:#fff;
    padding:30px;
    border-right:1px solid #eee;

    position:sticky;
    top:90px;

    height:calc(100vh - 90px);

    overflow-y:auto;
}

/* HIDE MOBILE CLOSE BUTTON IN DESKTOP */
.sidebar-close{
    display:none;
}

.sidebar-header{
    margin-bottom:30px;
}

.sidebar-header h2{
    font-size:28px;
    font-weight:700;
}

.filter-box{
    margin-bottom:35px;
}

.filter-box h3{
    margin-bottom:18px;
    font-size:17px;
    font-weight:700;
}

.filter-option{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
    cursor:pointer;
    font-size:15px;
}

.filter-option input{
    width:16px;
    height:16px;
}

.filter-box input[type="text"],
.filter-box input[type="number"],
.filter-box select{
    width:100%;
    padding:14px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
    font-size:15px;
}

.price-inputs{
    display:flex;
    gap:10px;
}

.filter-actions{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.apply-btn{
    background:#111;
    color:#fff;
    border:none;
    padding:15px;
    border-radius:10px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
}

.reset-btn{
    text-align:center;
    text-decoration:none;
    background:#eee;
    color:#111;
    padding:15px;
    border-radius:10px;
    font-weight:600;
}


/* =====================================================
   PRODUCT SECTION
===================================================== */

.product-section{
    flex:1;
    padding:40px;
}

.product-topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:35px;
    gap:20px;
}

.product-topbar h1{
    font-size:36px;
    margin-bottom:8px;
}

.product-topbar p{
    color:#777;
}

.product-count{
    background:#fff;
    padding:14px 22px;
    border-radius:12px;
    font-weight:600;
}


/* =====================================================
   PRODUCTS GRID
===================================================== */

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:28px;
}

.product-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    transition:0.3s;
    border:1px solid #eee;
}

.product-card:hover{
    transform:translateY(-6px);
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.product-image{
    width:100%;
    height:400px;
    overflow:hidden;
    background:#fafafa;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.product-content{
    padding:16px 18px;
}

.brand{
    font-size:12px;
    margin-bottom:6px;
}

.product-content h3{
    font-size:18px;
    margin-bottom:6px;
    line-height:1.3;
}

.category{
    margin-bottom:10px;
    font-size:13px;
}

.price{
    font-size:22px;
    margin-bottom:10px;
}

.stock{
    margin-bottom:12px;
    font-size:13px;
}

.in-stock{
    color:green;
}

.out-stock{
    color:red;
}

.sizes{
    gap:8px;
    margin-bottom:14px;
}

.sizes span{
    padding:6px 10px;
    font-size:12px;
    border:1px solid #ddd;
    background:#fafafa;
}

.view-btn{
    display:block;
    text-align:center;
    background:#111;
    color:#fff;
    padding:14px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
}


/* =====================================================
   PAGINATION
===================================================== */

.pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    margin-top:50px;
    flex-wrap:wrap;
}

.pagination a,
.pagination span{
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    text-decoration:none;
    background:#fff;
    color:#111;
    font-weight:600;
}

.pagination .active{
    background:#111;
    color:#fff;
}


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

.empty-products{
    background:#fff;
    padding:60px;
    border-radius:20px;
    text-align:center;
    grid-column:1/-1;
}


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

@media(max-width:1100px){

    body{
        padding-top:75px;
    }

    .shop-container{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
        top:0;
        border-right:none;
        border-bottom:1px solid #eee;
    }

    .product-section{
        padding:25px;
    }
}


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

@media(max-width:768px){

    body{
        padding-top:68px;
    }

    /* ================= TOP BAR ================= */

    .mobile-topbar{
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:10px;
        margin-bottom:15px;
    }

    /* MOBILE FILTER BUTTON ONLY MOBILE */
    .mobile-filter-btn{
        display:block;
        flex:1;

        background:#111;
        color:#fff;

        padding:12px;

        border-radius:12px;

        font-size:14px;
        font-weight:700;

        border:none;
    }

    .product-count{
        flex:1;

        background:#fff;

        padding:12px;

        border-radius:12px;

        font-size:13px;
        font-weight:600;

        text-align:center;

        border:1px solid #eee;

        margin-left:0;
    }

    /* ================= BLUR ================= */

    .shop-container.blur-active::after{
        content:"";
        position:fixed;
        inset:0;

        background:rgba(0,0,0,0.35);

        backdrop-filter:blur(3px);
        -webkit-backdrop-filter:blur(3px);

        z-index:999;
    }

    .shop-container.blur-active .product-section{
        filter:blur(2px);
        pointer-events:none;
    }

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

    .sidebar{
        position:fixed;

        top:68px;

        left:-100%;

        width:88%;

        height:calc(100vh - 68px);

        padding:18px;

        overflow-y:auto;

        transition:0.35s ease;

        background:rgba(255,255,255,0.75);

        backdrop-filter:blur(14px);
        -webkit-backdrop-filter:blur(14px);

        border-right:1px solid rgba(255,255,255,0.3);

        box-shadow:10px 0 40px rgba(0,0,0,0.2);

        z-index:1000;
    }

    .sidebar.active{
        left:0;
    }

    /* SHOW CLOSE BUTTON ONLY MOBILE */
    .sidebar-close{
        display:flex;

        align-items:center;
        justify-content:center;

        width:34px;
        height:34px;

        font-size:20px;
        font-weight:800;

        cursor:pointer;

        border-radius:10px;

        background:rgba(0,0,0,0.05);

        transition:0.2s;
    }

    .sidebar-close:hover{
        background:rgba(0,0,0,0.12);
    }

    .sidebar-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:18px;
    }

    .sidebar-header h2{
        font-size:20px;
        font-weight:800;
    }

    /* ================= PRODUCTS ================= */

    .product-topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .product-topbar h1{
        font-size:28px;
    }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
    }

    .product-image{
        height:180px;
    }

    .product-content{
        padding:12px;
    }

    .product-content h3{
        font-size:14px;
    }

    .price{
        font-size:18px;
    }

    .view-btn{
        padding:10px;
        font-size:13px;
    }
}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media(max-width:500px){

    .product-section{
        padding:18px 12px;
    }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    .product-image{
        height:160px;
    }

    .product-content{
        padding:10px;
    }

    .product-content h3{
        font-size:13px;
    }

    .brand{
        font-size:10px;
    }

    .price{
        font-size:16px;
    }

    .view-btn{
        padding:9px;
        font-size:12px;
    }
}

/* =====================================================
   HIDE MOBILE MENU BUTTON IN DESKTOP
===================================================== */

.mobile-filter-btn{
    display:none;
}

/* =====================================================
   SHOW ONLY IN MOBILE
===================================================== */

@media(max-width:768px){

    .mobile-filter-btn{
        display:flex;
        align-items:center;
        justify-content:center;
    }

}

/* =====================================================
   HIDE MOBILE TOPBAR IN DESKTOP
===================================================== */

.mobile-topbar{
    display:none;
}

@media(max-width:768px){

    .mobile-topbar{
        display:flex;
    }

}