/* ===========================
   Product Toolbar
=========================== */

.toolbar{

    display:flex;

    gap:15px;

    align-items:center;

    flex-wrap:wrap;

    margin:25px 0 35px;

}

.toolbar input,
.toolbar select{

    height:46px;

    padding:0 15px;

    border:1px solid #ddd;

    border-radius:10px;

    background:#fff;

    font-size:14px;

}

.toolbar input{

    flex:1;

    min-width:240px;

}

.btn-add{

    background:#1565c0;

    color:#fff;

    border:none;

    padding:12px 22px;

    border-radius:10px;

    cursor:pointer;

    transition:.25s;

}

.btn-add:hover{

    background:#0d47a1;

}


/* ===========================
   Modal
=========================== */

.product-modal{

    position:fixed;

    inset:0;

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

    display:none;

    justify-content:center;

    align-items:center;

    padding:40px;

    z-index:999;

}

.product-modal.active{

    display:flex;

}

.product-modal-content{

    background:#fff;

    width:100%;

    max-width:1100px;

    max-height:90vh;

    overflow:auto;

    border-radius:16px;

    padding:35px;

    position:relative;

}

.modal-close{

    position:absolute;

    left:20px;

    top:20px;

    width:40px;

    height:40px;

    border:none;

    background:#eee;

    border-radius:50%;

    cursor:pointer;

}


/* ===========================
   Form
=========================== */

.form-grid{

    display:grid;

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

    gap:20px;

    margin-bottom:25px;

}

.form-group{

    display:flex;

    flex-direction:column;

    margin-bottom:20px;

}

.form-group label{

    margin-bottom:8px;

    font-weight:600;

}

.form-group input,
.form-group select,
.form-group textarea{

    border:1px solid #ddd;

    border-radius:10px;

    padding:12px 15px;

    font-size:14px;

    font-family:inherit;

}

.form-group textarea{

    resize:vertical;

}


/* ===========================
   Product Boxes
=========================== */

.product-box{

    margin-top:40px;

    padding:25px;

    border:1px solid #e5e5e5;

    border-radius:15px;

    background:#fafafa;

}

.product-box h3{

    margin-bottom:20px;

}


/* ===========================
   Upload
=========================== */

.image-preview{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));

    gap:15px;

    margin-top:20px;

}

.image-item{

    height:140px;

    border:2px dashed #d8d8d8;

    border-radius:12px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#fff;

}


/* ===========================
   Specification Table
=========================== */

.spec-table{

    width:100%;

    border-collapse:collapse;

}

.spec-table th,
.spec-table td{

    border:1px solid #e5e5e5;

    padding:12px;

}

.btn-add-spec{

    margin-top:15px;

    border:none;

    background:#009688;

    color:#fff;

    padding:10px 20px;

    border-radius:10px;

    cursor:pointer;

}


/* ===========================
   Save
=========================== */

.btn-save{

    margin-top:30px;

    border:none;

    background:#2e7d32;

    color:#fff;

    padding:14px 28px;

    border-radius:10px;

    cursor:pointer;

}


/* ===========================
   Pagination
=========================== */

.pagination{

    display:flex;

    justify-content:center;

    gap:10px;

    margin:35px 0;

}

.pagination button{

    width:42px;

    height:42px;

    border:none;

    background:#eee;

    border-radius:8px;

    cursor:pointer;

}

.pagination .active{

    background:#1565c0;

    color:#fff;

}


/* ===========================
   Responsive
=========================== */

@media(max-width:768px){

    .form-grid{

        grid-template-columns:1fr;

    }

    .toolbar{

        flex-direction:column;

        align-items:stretch;

    }

}.spec-row{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;margin-bottom:10px}.spec-row input{border:1px solid #ddd;border-radius:10px;padding:12px;font:inherit}.btn-remove-spec{border:0;background:#f5d7d7;color:#a11;border-radius:10px;padding:0 14px;cursor:pointer}.existing-image{height:auto;min-height:170px;flex-direction:column;gap:8px;padding:10px}.existing-image img{width:100%;height:120px;object-fit:cover;border-radius:8px}.form-help{font-size:12px;color:#777}.admin-alert{padding:12px 16px;border-radius:10px;margin:15px 0}.admin-alert.error{background:#fdecec;color:#9b1c1c}@media(max-width:700px){.form-grid,.spec-row{grid-template-columns:1fr}.product-modal{padding:10px}.product-modal-content{padding:20px}}


.product-toolbar-form{display:grid;grid-template-columns:minmax(240px,1fr) 180px 180px 170px auto auto;gap:10px;align-items:center;margin:20px 0 28px}.product-toolbar-form input,.product-toolbar-form select{height:44px;padding:0 12px;border:1px solid #ddd;border-radius:10px;background:#fff;font:inherit}.btn-filter,.btn-reset-filter{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 16px;border-radius:10px;border:0;text-decoration:none}.btn-filter{background:#1565c0;color:#fff}.btn-reset-filter{background:#f1f3f5;color:#333}.btn-add-gallery{margin-top:8px;border:1px dashed #888;background:#fff;padding:9px 14px;border-radius:9px;cursor:pointer}.gallery-input-row{margin-top:8px}.gallery-new-preview{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.gallery-new-preview img{width:90px;height:90px;object-fit:cover;border-radius:9px;border:1px solid #ddd}.admin-help-box{padding:12px 14px;background:#f7fbff;border:1px solid #d9e9ff;border-radius:10px;margin-bottom:16px}@media(max-width:900px){.product-toolbar-form{grid-template-columns:1fr 1fr}.product-toolbar-form input{grid-column:1/-1}}@media(max-width:600px){.product-toolbar-form{grid-template-columns:1fr}.product-toolbar-form input{grid-column:auto}}
