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

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    background:#0f1115;
    color:#e6e6e6;
   overflow-x: hidden;  
}
/* ===== LAYOUT 2 CỘT ===== */
.shop-layout{
    display: flex;
    transition: margin-left .3s ease;
    min-height: 100vh;
}

/* ===== TOP BAR ===== */
.top-bar{
    position: fixed;
    top: 10px;
    left: 75px;
    right: 10px;
    z-index: 2100;

    display: flex;
    gap: 8px;
    padding: 8px;

    transition: all .3s ease;
}

/* ===== SEARCH INPUT ===== */
#searchInput{
    flex: 1;                 /* mặc định: ăn hết chiều ngang */
    width: auto;

    padding: 5px 10px;
    border-radius: 6px;
    border: none;
    outline: none;
    background: #1c1f26;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 0 0 2px rgba(239,77,45,.4);

    transition: width .3s ease;
}

/* ===== KHI MỞ PHÂN LOẠI ===== */
body.category-open #searchInput{
    flex: none;
    width: 120px;
}

/* Nút toggle */
.toggle-btn{
    position: fixed;
    top: 17px;
    left: 15px;
    z-index: 2000;
    background: #ef4d2d;
    color: #fff;
    border: none;
    padding: 5px 5px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Cột phân loại bên trái */
.category-box{
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background: #1a1d24;
    padding: 15px;
    border-right: 1px solid #2a2f3a;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1500;
}
/* Khi hiện */
.category-box.show{
    transform: translateX(0);
}

/* Header trong sidebar */
.category-header{
    height: 30px;          /* giữ khoảng trống cho nút */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-header button{
    background: #b32d2e;
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
/* Link phân loại */
.category-box a{
    display: block;
    padding: 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    background: #101218;
    font-size: 14px;
    transition: .2s;
}

.category-box a:hover{
    background: #ef4d2d;
    color: #fff;
}

.category-box a.active{
    background: #ef4d2d;
    color: #fff;
    font-weight: 700;
}
.shop-wrap{
    
    flex: 1;
    max-width: none;
    margin: 0;
    padding: 50px 20px 20px 20px;
    transition: 
        padding-left 0.3s cubic-bezier(.4,0,.2,1),
        padding-top  0.3s cubic-bezier(.4,0,.2,1);
    will-change: padding-left, padding-top;
    padding-top: 80px;   /* 👈 chừa chỗ cho search */
}
/* Khi mở phân loại: vừa sang phải vừa lên */
.shop-wrap.open{
    padding-top: 20px;
   padding-left: 240px;
}

/* GRID */
.shop-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
/* Card */
.item{
    width: 180px;
    background:#1a1d24;
    border-radius:10px;
    padding:6px;
    box-shadow:0 10px 25px rgba(0,0,0,.4);
    display:flex;
    flex-direction:column;
    height:300px;
    min-height:300px;
}

.item:hover{
    transform:translateY(-1px);
}

/* Ảnh */
.item img{
    width:100%;
    aspect-ratio: 4 / 4;
    object-fit:cover;
    border-radius:8px;
    margin-bottom:6px;
    border:1px solid #2a2f3a;
}

/* Tên sản phẩm */
.item h3{
    font-size:18px;
    font-weight:400;
    line-height:1.4;
    text-align:center;

    display: -webkit-box;
    -webkit-line-clamp: 3;        /* tối đa 3 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Khối dưới cùng của card */
.bottom{
    margin-top:auto;          /* đẩy cả cụm xuống đáy card */
    display:flex;
    flex-direction:column;
    
}

/* Giá */
.price{
    color:#ee4d2d;
    font-weight:500;
    font-size:16px;         /* to hơn */
    text-align:center;      /* căn giữa */
       margin-bottom:4px;        /* khoảng cách cố định với nút */
}

.buy{
    text-align:center;
    background:#ef4d2d;
    color:#fff;
    padding:6px;
    border-radius:6px;
    text-decoration:none;
    font-weight:700;
    font-size:14px;
}

.buy:hover{
    background:#f05d40;
}
.no-product{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;           /* chữ to */
    font-weight: 700;
    color: #888;
    text-align: center;
    letter-spacing: 1px;
    white-space: nowrap;   /* 👈 KHÔNG cho xuống dòng */
}
.category-title{
    position: fixed;
    top: 52px;
    left: 50%;
    transform: translateX(-100%);
    z-index: 1500;

    background: #1a1d24;
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,.4);

    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

/* Khi hiện */
.category-title.show{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== TABLET ===== */
@media (max-width: 1024px){
    .item{
        height:260px;
    }
    .item h3{
        font-size: auto;     /* vẫn to vừa trên điện thoại */
        -webkit-line-clamp: 9;        /* tối đa 3 dòng */
    }
    .no-product{
         font-size: 20px;    
    }
    .top-bar{
        left: 76px;
    }
    /* ===== SEARCH INPUT ===== */
    #searchInput{
        width: 119px;
        
        padding: 5px 10px;
    }

}

/* ===== MOBILE ===== */
@media (max-width: 768px){
    .item{
        height:220px;
    }

    .item h3{
         font-size: auto;     /* vẫn to vừa trên điện thoại */
          -webkit-line-clamp: 9;        /* tối đa 3 dòng */
    }

     .no-product{
         font-size: 15px;    
    }
    .top-bar{
        left: 76px;
    }
    /* ===== SEARCH INPUT ===== */
    #searchInput{
        width: 119px;
        
        padding: 4px 10px;
    }

}

