

/* ===============================
   PRODUCTS SECTION BASE
================================ */

#products.screen{
  padding:0;
  background:#f4f6f9;
}

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

#products .stock-header{
  background:linear-gradient(135deg,#1565c0,#1e88e5);
  color:#fff;
  padding:16px;
  border-bottom-left-radius:20px;
  border-bottom-right-radius:20px;
  font-weight:600;
}

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

#products .stock-search{
  position:relative;
  width:96%;
  margin:15px auto;
}

#products .stock-search input{
  width:100%;
  padding:12px 45px 12px 15px;
  border-radius:25px;
  border:1px solid #ddd;
  border-bottom:3px solid #1565c0;
  outline:none;
  background:#fff;
  font-size:15px;
}

#products .stock-search .search-icon{
  position:absolute;
  right:15px;
  top:50%;
  transform:translateY(-50%);
  color:#1565c0;
}

/* ===============================
   TABS
================================ */

#products .product-tabs{
  display:flex;
  width:96%;
  margin:10px auto 15px auto;
  gap:8px;
}

#products .tab-btn{
  flex:1;
  padding:10px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-weight:600;
  background:#e0e0e0;
  transition:0.2s;
}

#products .tab-btn.active{
  background:#1565c0;
  color:#fff;
}

/* ===============================
   PRODUCT LIST
================================ */

#products .stock-list{
  padding:0 10px;
}

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

#products .stock-card{
  background:#fff;
  margin-bottom:12px;
  padding:12px;
  border-radius:14px;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
  display:flex;
  flex-direction:column;
  transition:0.2s;
}

#products .stock-card:hover{
  transform:translateY(-2px);
}

/* TOP ROW */
.stock-top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* ICON */
.product-avatar{
  width:45px;
  height:45px;
  border-radius:50%;
  background:linear-gradient(135deg,#42a5f5,#1e88e5);
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-avatar .material-icons{
  color:#fff;
  font-size:22px;
}

/* INFO */
.product-info{
  flex:1;
  display:flex;
  flex-direction:column;
}

.stock-name{
  font-weight:600;
  font-size:15px;
  color:#222;
}

.stock-price{
  font-weight:700;
  color:#006aff;
}

/* BOTTOM */
.stock-bottom-row{
  margin-top:5px;
  font-size:13px;
  color:#666;
}

/* ===============================
   ACTION SCREEN
================================ */

#productActionScreen{
  background:#f4f6f9;
}

.product-action-wrapper{
  padding:20px 15px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.product-action-btn{
  padding:14px;
  border-radius:12px;
  border:1px solid #ddd;
  background:#fff;
  font-size:15px;
  font-weight:600;
  color:#1565c0;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
  cursor:pointer;
  transition:0.2s;
}

.product-action-btn:hover{
  transform:scale(1.02);
}

.delete-btn-action{
  color:#d32f2f;
  border-color:#ffcdd2;
}

/* ===============================
   ADD PRODUCT FORM (FULL SYSTEM)
================================ */

#addProductScreen{
  padding:20px 15px;
  background:#f4f6f9;
}

/* FORM GROUP */
#addProductScreen .form-group{
  position:relative;
  margin-bottom:22px;
}

/* INPUTS */
#addProductScreen input,
#addProductScreen select,
#addProductScreen textarea{
  width:100%;
  padding:16px;
  font-size:15px;
  border:2px solid #1976d2;
  border-radius:14px;
  background:#fff;
  outline:none;
  box-sizing:border-box;
  transition:0.2s;
  color:#000;
}

/* TEXTAREA */
#addProductScreen textarea{
  min-height:90px;
  resize:none;
}

/* FOCUS */
#addProductScreen input:focus,
#addProductScreen select:focus,
#addProductScreen textarea:focus{
  border-color:#0d47a1;
  box-shadow:0 0 0 3px rgba(25,118,210,0.15);
}

/* FLOATING LABEL */
#addProductScreen .form-group label{
  position:absolute;
  top:-10px;
  left:12px;
  background:#f4f6f9;
  padding:0 6px;
  font-size:13px;
  color:#0d47a1;
  font-weight:600;
}

/* ===============================
   PRICE + PROFIT ROW
================================ */

.sale-profit-row{
  display:flex;
  gap:10px;
  align-items:center;
}

.sale-input{
  flex:2;
}

.profit-inline{
  flex:1;
  text-align:center;
  font-weight:700;
  color:#0d47a1;
}

.profit-divider{
  width:2px;
  height:40px;
  background:#1976d2;
}

/* ===============================
   UNIT SELECT FIX
================================ */

.unit-group select{
  height:52px;
  line-height:52px;
  appearance:none;
}

/* ===============================
   BUTTONS
================================ */

.form-btn-row{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.btn-save{
  flex:1;
  padding:12px;
  background:#1565c0;
  color:#fff;
  border:none;
  border-radius:10px;
  font-weight:600;
}

.btn-close{
  flex:1;
  padding:12px;
  background:#eee;
    color:#111;

  border:none;
  border-radius:10px;
  font-weight:600;
}



/* =========================
   MEDIA PICKER BOX
========================= */

.media-box{
    cursor:pointer;
}

.media-preview{
    padding:20px;
    border:2px dashed #1976d2;
    border-radius:12px;
    text-align:center;
    background:#f5f9ff;
    color:#1976d2;
    font-weight:600;
    min-height:80px;
    
}
.media-preview {
    pointer-events: auto;
}

.media-preview img{
    display:inline-block;
    object-fit:cover;
}




.gallery-item {
    position: relative;
    width: 60px;
    height: 60px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.gallery-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: red;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}




.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
/*Gallery preview fix*/
.gallery-box{
    border:2px dashed #1976d2;
    border-radius:12px;
    overflow:hidden;
    background:#f5f9ff;
}

.gallery-box .gallery-preview{
    min-height:120px;
    padding:12px;
    border:none;
    background:transparent;
}

.gallery-box .media-add-btn{
    margin:0;
    border:none;
    border-top:1px solid rgba(25,118,210,0.25);
    border-radius:0;
    background:#eef5ff;
    padding:14px;
    font-weight:600;
    color:#1976d2;
}

.gallery-box .media-add-btn:hover{
    background:#e4efff;
}

.gallery-placeholder{
    width:100%;
    text-align:center;
    color:#1976d2;
    padding:30px 10px;
    font-weight:600;
}

.image-source-modal{

    display:none;

    position:fixed;

    inset:0;

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

    z-index:99999;

    align-items:center;

    justify-content:center;
}

.image-source-box{

    background:#fff;

    width:90%;

    max-width:320px;

    border-radius:16px;

    padding:20px;

    text-align:center;
}

.image-source-box h3{

    margin-bottom:18px;
}

.source-btn{

    width:100%;

    border:none;

    margin-bottom:12px;

    padding:14px;

    border-radius:10px;

    font-size:15px;

    cursor:pointer;
}

.source-close-btn{

    width:100%;

    border:none;

    padding:12px;

    border-radius:10px;

    cursor:pointer;
}



.multi-select-box{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:8px;
    border:1px solid #ddd;
    border-radius:10px;
    min-height:50px;
}

.cat-chip{
    padding:6px 10px;
    border:1px solid #ccc;
    border-radius:20px;
    font-size:13px;
    cursor:pointer;
    background:#f7f7f7;
    user-select:none;
    transition:0.2s;
}

.cat-chip:hover{
    background:#eee;
}

.cat-chip.active{
    background:#000;
    color:#fff;
    border-color:#000;
}



/*Old product scren css */

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

#products .stock-header{
  background:#1565c0;
  color:#fff;
  padding:15px;
  border-bottom-left-radius:20px;
  border-bottom-right-radius:20px;
}

/* ===============================
   PRODUCT TABS
================================ */

#products .product-tabs{
  display:flex;
  width:96%;
  margin:15px auto;
  gap:8px;
}

#products .product-tabs .tab-btn{
  flex:1;
  padding:10px;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  background:#e0e0e0;
  color:#000;
  transition:0.2s;
}

#products .product-tabs .tab-btn.active{
  background:#1565c0;
  color:#fff;
}

#products .product-tabs .tab-btn:hover{
  background:#1976d2;
  color:#fff;
}

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

#products .stock-search{
  position:relative;
  margin:15px auto 20px auto;   /* search box thora uper gap */
  width:96%;
}

#products .stock-search input{
  width:100%;
  padding:10px 40px 10px 15px;
  border-radius:25px;
  border:1px solid #ccc;
  border-bottom:3px solid #1565c0;
  box-sizing:border-box;
  outline:none;
}

#products .stock-search .search-icon{
  position:absolute;
  right:15px;
  top:50%;
  transform:translateY(-50%);
  color:#1565c0;
  font-size:20px;
  pointer-events:none;
}

/* ===============================
   PRODUCT LIST
================================ */

#products .stock-list{
  padding:0;
}

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

#products .stock-card{
  background:#fff;
  padding:12px;
  margin-bottom:10px;
  border-radius:12px;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
  display:flex;
  flex-direction:column;
}

.stock-top-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.stock-name{
  font-weight:600;
  font-size:16px;
  color:#333;
}

.stock-price{
  font-weight:800;
  font-size:16px;
  color:#006AFF;
  padding:2px 6px;
}

.stock-bottom-row{
  font-size:13px;
  margin-top:4px;
  color:#555;
}

/* remove old badges */

.stock-qty,
.in-stock,
.out-stock{
  background:none;
  color:inherit;
  padding:0;
}

/* remove side gaps for products screen */

#products.screen{
  padding-left:1px;
  padding-right:1px;
}
/* Product Avatar */
.product-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.product-avatar .material-icons {
    font-size: 22px;
    color: #1e88e5;
}

/* Row Layout */
.stock-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Info column */
.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-avatar {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.product-avatar .material-icons {
    color: #fff;
}
/* ===============================
   PRODUCT ACTION SCREEN
================================ */

#productActionScreen{
  padding-top:20px;
}

.product-action-wrapper{
  margin-top:20px;
  display:flex;
  flex-direction:column;
  gap:15px;
  padding:0 15px;
}

.product-action-btn{
  color:#1565c0;
  background:#fff;
  border:1px solid #ddd;
  padding:14px;
  font-size:16px;
  font-weight:600;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,0.05);
  cursor:pointer;
  transition:0.2s;
}

.product-action-btn:hover{
  transform:scale(1.02);
}

.delete-btn-action{
  color:#d32f2f;
  border-color:#f8d7da;
}

/* ===============================
   ADD PRODUCT FORM
================================ */

#addProductScreen{
  padding:20px 16px;
}

#addProductScreen .form-group{
  position:relative;
  margin-bottom:24px;
}

#addProductScreen input {
  width:96%;
  padding:22px 18px;
  font-size:17px;
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
}

#addProductScreen select {
  width:96%;
  padding:16px 18px;         /* تھوڑا زیادہ padding تاکہ value پوری visible ہو */
  font-size:17px;
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
  appearance:none;           /* icon remove کرنے کے لیے */
  -webkit-appearance:none;   /* Safari/Chrome */
  -moz-appearance:none;      /* Firefox */
  background-image:none;     /* default dropdown arrow remove */
}

/* focus effect */
#addProductScreen select:focus{
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* label for select */
.select-label{
  position:static;
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}
#addProductScreen input,
#addProductScreen select{
  color:#000;
  font-weight:500;
}

/* focus effect */

#addProductScreen input:focus,
#addProductScreen select:focus{
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* floating labels */

#addProductScreen .form-group label{
  position:absolute;
  top:-10px;
  left:18px;
  background:#f4f6f9;
  padding:0 8px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
  pointer-events:none;
}

/* select label fix */

.select-label{
  position:static;
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}

/* ===============================
   UNIT SELECT FIELD FIX
================================ */
#addProductScreen .unit-group select {
  width:96%;
  height:56px;                 /* same as input */
  padding:0 18px;              /* vertical padding 0, horizontal 18px */
  font-size:17px;
  line-height:56px;            /* vertically center the selected value */
  border:3px solid #1976d2;
  border-radius:16px;
  background:#f1f3f6;
  box-sizing:border-box;
  transition:0.3s;
  color:#000;
  appearance:none;             /* remove default arrow/icon */
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:none;       /* remove default arrow */
  text-align:left;             /* value aligned left */
}

/* focus effect */
#addProductScreen .unit-group select:focus {
  border-color:#0d47a1;
  box-shadow:0 0 0 4px rgba(25,118,210,0.15);
  background:#fff;
  outline:none;
}

/* label for unit select */
#addProductScreen .unit-group .unit-label {
  display:block;
  margin-bottom:6px;
  font-size:14px;
  color:#0d47a1;
  font-weight:600;
}

/* ===============================
   SALE + PROFIT INLINE
================================ */

.sale-profit-row{
  display:flex;
  align-items:center;
  gap:12px;
}

.sale-input{
  flex:2;
}

.sale-input input{
  width:100%;
}

.profit-divider{
  width:2px;
  height:40px;
  background:#1976d2;
}

.profit-inline{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:16px;
  color:#0d47a1;
}