/* =========================
   CATEGORY SCREEN
========================= */

.category-tabs{
    display:flex;
    gap:10px;
    margin:15px 10px;
}

.category-tabs .tab-btn{
    flex:1;
    border:none;
    padding:12px;
    border-radius:12px;
    background:#f1f5f9;
    color:#111827;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
}

.category-tabs .tab-btn.active{
    background:#111827;
    color:#fff;
}

.form-card{
    padding:15px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.form-card input,
.form-card textarea{
    width:100%;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:14px;
    box-sizing:border-box;
}

.btnPrimary{
    border:none;
    background:#111827;
    color:#fff;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
}

.btnPrimary:hover{
    opacity:.9;
}

/* =========================
   IMAGE PICKER
========================= */

.cat-media-box{
    border:2px dashed #cbd5e1;
    border-radius:12px;
    padding:12px;
    text-align:center;
    cursor:pointer;
    background:#f8fafc;
    min-height:120px;

    display:flex;
    align-items:center;
    justify-content:center;
}

.cat-media-box img{
    width:100%;
    max-height:180px;
    object-fit:cover;
    border-radius:10px;
}

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

.category-grid{

    display:grid;

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

    gap:14px;

    padding:10px;

    width:100%;

    box-sizing:border-box;

    overflow:hidden;
}

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

.cat-card{

    background:#fff;

    border-radius:14px;

    overflow:hidden;

    box-shadow:0 2px 10px rgba(0,0,0,.08);

    display:flex;

    flex-direction:column;

    width:100%;


    max-width:100%;

    box-sizing:border-box;
}

.cat-card img{
    width:100%;
    height:110px;
    object-fit:cover;
    display:block;
}

.cat-placeholder{
    height:110px;
    background:#f3f4f6;

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

    color:#6b7280;
    font-size:13px;
}

.cat-card-body{
    padding:12px;

    display:flex;

    flex-direction:column;

    align-items:center;

    text-align:center;
}

.cat-card h4{

    margin:0;

    width:100%;

    text-align:center;

    font-size:15px;

    font-weight:600;

    color:#111827;

    word-break:break-word;

    line-height:1.4;
}

.cat-product-count{
    margin-top:8px;

    display:inline-block;

    background:#ecfdf5;
    color:#16a34a;

    padding:4px 10px;
    border-radius:999px;

    font-size:12px;
    font-weight:600;
}

/* =========================
   CARD FOOTER
========================= */
.cat-card-footer{

    width:100%;

    display:flex;

    align-items:center;

    justify-content:space-between;

    margin-top:12px;
}

.cat-id{

    flex:1;

    text-align:center;

    font-size:12px;

    color:#6b7280;
}

.cat-menu-btn{

    width:34px;

    height:34px;

    flex-shrink:0;

    border:none;

    background:#f3f4f6;

    color:#111827;

    border-radius:8px;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:22px;

    font-weight:700;
}





/* =========================
   DROPDOWN MENU
========================= */

.cat-dropdown{
    position:absolute;
    background:#fff;
    min-width:150px;
    border-radius:10px;
    box-shadow:0 8px 25px rgba(0,0,0,.12);
    overflow:hidden;
    z-index:9999;
}

.cat-dropdown div{
    padding:10px 12px;
    cursor:pointer;
    font-size:14px;
}

.cat-dropdown div:hover{
    background:#f3f4f6;
}

/* =========================
   PRODUCT MODAL
========================= */

.cat-product-modal{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.55);

    display:none;

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

    z-index:99999;
}

.cat-product-box{
    width:95%;
    max-width:550px;
    height:80vh;

    background:#fff;

    border-radius:16px;

    display:flex;
    flex-direction:column;

    overflow:hidden;
}

.cat-product-header{
    padding:12px;
    border-bottom:1px solid #e5e7eb;
    background:#fff;
}

.cat-product-header input{
    width:100%;
    padding:10px 12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    box-sizing:border-box;
}

.cat-product-list{
    flex:1;
    overflow-y:auto;
}

/* =========================
   PRODUCT ROW
========================= */

.cat-product-row{
    display:flex;
    align-items:center;

    gap:10px;

    padding:10px 14px;

    border-bottom:1px solid #f1f5f9;
}

.cat-product-row input[type="checkbox"]{
    width:18px;
    height:18px;

    margin:0;

    flex-shrink:0;
}

.cat-product-name{
    flex:1;
    text-align:left;
    word-break:break-word;
}

/* =========================
   MODAL FOOTER
========================= */

.cat-product-footer{
    padding:12px;
    border-top:1px solid #e5e7eb;

    display:flex;
    gap:10px;

    background:#fff;
}

.cat-product-footer button{
    flex:1;

    border:none;

    padding:12px;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;
}

.cat-save-btn{
    background:#111827;
    color:#fff;
}

.cat-close-btn{
    background:#e5e7eb;
    color:#111827;
}

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

.screenHeader{
    padding:15px;
    border-bottom:1px solid #e5e7eb;
    background:#fff;
}

.screenHeader h2{
    margin:0;
    font-size:20px;
    font-weight:700;
}