/* تنظیمات کلی */
@font-face {
    font-family: 'B Roya'; /* نام دلخواه برای فونت */
    src: url('../font/BRoyaBd_0.ttf') format('truetype'); /* فرمت مدرن */
    font-weight: normal;
    font-style: normal;
  } 
     
        :root{
            --main-border-color:rgb(138, 138, 140);
            --main-font-family: 'B Roya';
            --main-background-color:rgb(230, 241, 209) !important;
            --main-font-size:1rem;
            --main-focus-color:blue;
            --main-click-color:blue;
          }
      *{
            direction: rtl;
               margin:0;
               padding:0;
               box-sizing:border-box;
               font-family:var(--main-font-family);
               background-color: rgb(247, 247, 242);
    }
    #main-header .accountAndCartInHead {
      display: none;
      position: relative;
      align-items: center;
      width: fit-content;
      flex-direction: row;
      gap: 5px;
      align-content: center;
      justify-content: center;
      background-color: white;
      max-height: 40px;
      height: 40px;
      border: 1px solid black;
      border-radius: 5px;
      font-family: var(--main-font-family);
      font-size: 1.2rem;
      color: black;
      padding: 0px 5px;
      cursor: pointer;
    }
    
    #main-header .accountAndCartInHead span {
      background-color: transparent;
    }
    
    #main-header .cart-count {
      position: absolute;
      top: -8px;
      right: 20px;
      width: 20px;
      height: 20px;
      background: red !important;
      color: white;
      border-radius: 50%;
      font-size: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    #main-header .account,
    #main-header .cart {
      display: none;
    }
    
    #main-header {
      display: flex;
      align-items: center;
      width: 100%;
      max-width: 1200px;
      margin: 5px auto;
      gap: 5px;
      padding-right: 50px;
      justify-content: center;
    }
    
    #main-header .logo {
      width: 20%;
      max-width: 20%;
    }
    
    #main-header .searchForm {
      display: flex;
      height: 40px;
      max-height: 40px;
      border-radius: 5px;
      border: 1px solid black;
      gap: 5px;
      padding: 0px 5px;
      align-items: center;
      background-color: white;
      width: 45%;
      margin-left: 30px;
      margin-right: 20px;
    }
    
    #main-header .searchInput {
      width: 95%;
      border: none;
      max-height: 40px;
      margin: 0;
      padding: 2px 5px;
      font-family: var(--main-font-family);
      font-size: 1.2rem;
      background-color: transparent;
    }
    
    #main-header .searchInput:focus {
      border: none !important;
      outline: none !important;
    }
    
    #main-header .mobilenumber {
      align-self: center;
      margin-top: 1px;
      font-size: 0.9rem !important;
      color: #57606f;
      margin: 0 auto;
    }
    
    #main-header .customerName {
      align-self: center;
      white-space: nowrap;
    }
    
    #main-header .crediteResidue {
      font-size: 0.8rem;
      color: red;
      display: flex;
      align-items: center;
      cursor: pointer;
    }
    
    #main-header .accountDropDown {
      position: absolute;
      display: flex;
      flex-direction: column;
      display: none;
      top: 103%;
      transform: translateX(-50%);
      background-color: white;
      border-radius: 5px;
      border: 1px solid var(--main-border-color);
      padding: 5px;
    }
    
    #main-header .accountDropDown1 {
      width: 170%;
      left: 50%;
      margin-top: 1px;
      z-index: 500;
    }
    
    #main-header .accountDropDown2 {
      width: 800%;
      left: +400%;
      max-height: 500px;
      overflow: auto;
      margin-top: 1px;
      z-index: 500;
  
    }
    
    #main-header .carts-container {
      width: 100%;
      border: 1px solid var(--main-border-color);
      border-radius: 5px;
      color: red;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    
    #main-header .accountDropDown.active {
      display: flex;
      cursor: auto;
    }
    
    #main-header .mandeHesab {
      font-size: 0.8rem !important;
      display: none;
      margin-top: 2px;
    }
    
    #main-header .dropDownForm {
      display: flex;
      flex-direction: row;
      gap: 10px;
      padding: 0 5px;
      align-items: center;
      font-size: 1rem;
      cursor: pointer;
      background-color: transparent;
    }
    
    #main-header .dropDownForm a {
      text-decoration: none;
      color: black;
      background-color: transparent;
    }
    
    #main-enter .modal-overlay ,#main-cart .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      display: flex;
      justify-content: center;
      align-items: flex-start;
      opacity: 0;
      visibility: hidden;
      transition: 0.3s;
    }
    #main-cart .last-confirm{
      display: flex;
      flex-direction: column;
      width: 60%;
      margin-top:100px;
      border-radius: 5px;
    
      padding-bottom: 10px;
    
    
    }
    #main-cart .confirm-table-container{
      padding: 10px;
    }
    #main-cart .pay-cancel{
      margin-top: 20px;
      display: flex;
      flex-direction: row;
      direction: ltr;
      width: 100%;
      padding: 0.5rem;
      gap: 5px;

    }
    #main-cart .pay-cancel-row ,#ready-to-pay .pay-back-row{
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      background-color: red;
      border-radius: 5px;
      border: none;
      padding: 5px 10px;
      color: white;
      font-size: 1.2rem;
       cursor: pointer;
    }
    #main-cart .pay-cancel-row span{
      font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transform: translateY(+2px);

    }
    #main-cart .confirm-header{
      display: flex;
      width: 100%;
      background-color: red;
      justify-content: space-between;
      align-items: center;
      color: white;
      font-size: 1.3rem;
      border-top-right-radius: 5px;
      border-top-left-radius: 5px;
      padding: 0.3rem 1rem;

    }
    #main-cart .confirm-exit{
      background-color: transparent;
      font-weight: bold;
      cursor: pointer;
    }
#main-cart .credit-total-cost{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  font-size: 1.3rem;
  gap: 40%;
  padding:0.5rem 1rem;
}

    
    #main-enter .enter-form {
      width: 400px;
      max-width: 400px;
      background-color: rgb(255, 255, 255);
      border-radius: 8px;
      box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
      margin: auto;
    }
    
    #main-enter .sarTitr {
      height: 40px;
      padding: 0px 11px 0 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: red;
      border-radius: 5px 5px 0 0;
      font-family: 'B Roya';
      color: white;
      font-weight: bold;
    }
    
    #main-enter .sarTitr span {
      cursor: pointer;
    }
    
    #main-enter .prperties {
      margin-top: 0;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 1px;
      font-family: 'B Roya';
      color: rgb(54, 53, 53);
      font-size: 1rem;
      background-color: transparent;
    }
    
    #main-enter .spanDown {
      font-size: .8rem;
      color: red;
      margin-top: 0;
      background-color: transparent;
    }
    
    #main-enter .spanUp {
      background-color: transparent;
    }
    
    #main-enter .prperties input {
      direction: ltr;
      font-size: 1.2rem;
      height: 1.1rem;
      font-family: 'B Roya';
      border: none;
      border-bottom: 1px solid rgb(20, 19, 19);
      outline: none !important;
      width: 100%;
      box-sizing: border-box;
      padding-left: 5px;
      background-color: transparent;
    }
    
    #main-enter .prperties span:nth-of-type(2) {
      margin-top: 5px;
    }
    
    #main-enter .prperties input:hover {
      border-bottom: 2px solid rgb(20, 19, 19);
      outline: none !important;
    }
    
    #main-enter .prperties input:focus {
      border-bottom: 2px solid rgb(10, 33, 233);
      outline: none !important;
    }
    
    #main-enter .prperties input::placeholder {
      font-size: 1.2rem;
    }
    
    #main-enter .memoryMe {
      margin: 2px auto;
      width: 95%;
      font-family: 'B Roya';
      line-height: 20px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      margin-top: 25px;
      margin-bottom: 20px;
      gap: 15px;
      padding: 0 5px 5px 5px;
      font-size: 1.2rem;
      background-color: transparent;
    }
    
    #main-enter .memoryMe a {
      background-color: transparent;
    }
    
    #main-enter .rememberMe {
      background-color: transparent;
    }
    
    #main-enter .memoryMe div:nth-of-type(1) {
      display: flex;
      flex-direction: row;
      gap: 5px;
      color: rgb(54, 53, 53);
      background-color: transparent;
    }
    
    #main-enter .memoryMe div:nth-of-type(2) {
      color: rgb(54, 53, 53);
      background-color: transparent;
    }
    
    #main-enter .memoryMe input {
      padding-top: 8px;
      padding-bottom: 8px;
    }
    
    #main-enter .exit {
      font-size: 25px;
      background-color: transparent;
    }
    
    #main-enter .login-wrapper {
      width: 90%;
      display: flex;
      justify-content: flex-end;
      background-color: transparent;
    }
    
    #main-enter .btn-login {
      background-color: red !important;
      color: #fff;
      border: 0;
      border-radius: 3px;
      font-size: 1.1rem;
      padding: 2px 16px;
      font-family: 'B Roya', Tahoma, sans-serif;
      cursor: pointer;
      transition: background 0.2s ease;
    }
    
    #main-enter .btn-login:hover {
      background-color: darkred !important;
    }
    
    #main-enter .dialog ,#main-product .dialog{
      font-family: var(--main-font-family);
      font-size: 1.5rem;
      background: white;
      padding: 0px 10px 10px 10px;
      border-radius: 12px;
      min-width: 35%;
      max-width: 90%;
      box-shadow: 0 10px 30px rgba(0,0,0,0.3);
      flex-direction: column;
      color: black;
      justify-content: center;
      display: flex;
    }
    
    #main-enter .dialog div ,#main-product .dialog div{
      background-color: transparent;
      width: 90%;
      display: flex;
      justify-content: flex-end;
    }
    
    #main-enter .alertText ,#main-product .alertText{
      background-color: transparent;
    }
    
    #main-enter .messageModal {
      z-index: 2000;
    }
    
    #main-enter .loginModal {
      z-index: 1000;
    }
    
    #main-enter .dialog span {
      display: block;
      display: flex;
      justify-content: center;
      margin-bottom: 30px;
      margin-top: 1rem;
    }
    
    #main-enter .dialog div button {
      background-color: red;
      border-radius: 5px;
      border: none;
      font-size: 1.5rem;
      font-family: var(--main-font-family);
      padding: 0 10px 0 10px;
      line-height: 2rem;
      color: white;
    }
    
    #main-enter .modal-overlay.active ,#main-cart .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    
    #main-enter .modal {
      background: white;
      padding: 20px;
      border-radius: 6px;
      width: 300px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    
    #main-header .my-carts {
      margin-top: 15px;
    }
    
    #main-header table {
      width: 95%;
      border-collapse: collapse;
      table-layout: fixed;
      margin: 1rem auto;
    }
    #main-header table th:first-child {
      border-top-right-radius: .7rem;
  }
  #main-header table th:last-child {
    border-top-left-radius: .7rem;
  }
  
    #main-header table tr:nth-child(even) td {
      background-color: #ffffff !important;
    }
    
    #main-header table tr:nth-child(odd) td {
      background-color: #f8f4f4 !important;
    }
    #main-header th,
    #main-header td {
      font-size: 1.2rem;
      background-color: var(--main-background-color);
      padding: 5px 0;
      color: black;
      font-family: var(--main-font-family);
      text-align: center;
      vertical-align: middle;
    }
    
    #main-header th {
      color: white;
      background-color: red;
    }
    
    #main-header td {
      font-size: 1.2rem;
      background-color: rgb(255, 255, 255);
      border: 1px solid rgb(221, 219, 219);
      vertical-align: middle;
    }
    
    #main-header .priceTakmili {
      width: 90%;
      max-width: 90%;
      display: flex;
      flex-direction: column;
      background-color: rgb(166, 8, 8);
      border: 1px solid #aaa;
      padding: 5px;
    }
    
    #main-header .tdDiv {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      background-color: transparent;
      margin: 1rem auto;
      gap: .2rem;
    }
    #main-header .tdDiv span{
      font-size: .8rem !important;
    }
    #main-header .shomareSpan ,#main-cart .shomareSpan {
      color: red !important;
  
    }
    
    #main-header .tdDiv span {
      background-color: transparent;
    }
    #main-header .Finalize-purchase{
      border: none;
      border-radius: 8px;
      background-color: rgb(196, 149, 6);
      padding: 5px 15px;
      display: flex;
      align-self: flex-end;
      margin: 20px 50px;
      cursor: pointer;
      font-family: var(--main-font-family);
      font-size: var(--main-font-size);
    }
    .SVGs{
      width: 18px;
      height: 18px;
      background-color: transparent;
      cursor: pointer;

    }
    .imgS ,.imgs{
      width:20px;
       height:10px;
       background-color: transparent;
    }
    #ready-to-pay .gates .imgs.rotate-180 {
      transform: rotate(180deg);
    }
    #orders {
      display: grid; /* تغییر از flex به grid برای کنترل بهتر عرض */
      grid-template-columns: 1fr; 
      flex: 1;
      min-width: 0;
      border: 1px solid rgb(159, 157, 157);
      border-radius: 5px;
      padding: 10px;
      align-items: flex-start;
      /* gap: 5px;  */
      align-content: start; 
  }
  
  .table-wrapper, .confirm-table-wrapper {
      width: 100%;
      overflow-x: auto;
      display: block; /* اطمینان از بلوکی بودن */
      padding-top: 0;
      margin-top: 0;
      border: 1px solid var(--main-border-color);
      }
     
  .in-process-head ,.archive-head{
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    font-size: var(--main-font-size);
    margin-bottom: 0px;
     }
     #deliveredBtn:focus{
      outline: none;
  }
  #allBtn:focus{
    outline: none;
  }
     .in-process-head.active ,.archive-head.active{
border-bottom: 2px solid red;
       }
  
  .all-table {
      width: 100%;
      min-width: 1000px;
      border-collapse: collapse;
      margin-bottom: 50px;
  }
  
  .all-table th {
      font-size: 1rem;
      border: 1px solid rgb(255, 255, 255);
      white-space: nowrap; /* مانع شکستن متن */
      text-align: center;
      background-color: rgb(231, 229, 229) !important;
  }
  .all-table td {
    padding: 12px;
    border: 1px solid #ddd;
    white-space: nowrap; /* مانع شکستن متن */
    text-align: center;
    font-size: 1rem;

}
.all-table tr:first-child th{
  border-bottom: 2px solid red;
  border-top: 2px solid #ddd;
  border-left: 2px solid #ddd;
  border-right: 2px solid #ddd;
}
.all-table tbody tr:hover td{
  background-color: #e8ebf2 !important;
}
.all-table{
  border: 1px solid var(--main-border-color);
}


  .all-table tr:nth-child(even) td {
    background-color: #f9f9f9;
  }
  
  .all-table tr:nth-child(odd) td {
    background-color: #ffffff;
  }
  .titleTd{
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word; 
    background-color: transparent;
  }




  html, body {
      max-width: 100%;
      overflow-x: hidden; /* مانع اسکرول خوردن کل صفحه شود */
      margin: 0;
      padding: 0;
  }
  #main-cart {
      display: flex;
      width: 90%;
      max-width: 1200px;
      margin: 10px auto;
      gap: 10px;
      /* این خط بسیار مهم است */
      table-layout: fixed; 
  }
  
    #side-bar{
      width: 18%;
      display: flex;
      flex-direction: column;
  
      gap: 10px;
   
  }
  #side-bar .userInfo ,#side-bar .order-panel ,#side-bar .reports{
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    border: 1px solid rgb(159, 157, 157);
    padding: 10px;
    align-items: center;
    justify-content: flex-start;
    margin-left: 5px;
      }
      #side-bar .order-panel{
        gap: 5px;
      }

  #side-bar .order-row ,#side-bar .reports-row ,#side-bar .orders-sub-row{
    display: flex;
    gap: 0.5rem;
    font-family: var(--main-font-family);
    font-size:1.2rem;
    justify-items: center;
    align-items: center;
    width: 100%;
    cursor: pointer;
    }
    #side-bar .orders-sub-row{
      padding-right:0.8rem;
    }
    #side-bar .order-row:hover{
      background-color: rgb(240, 237, 237);
    }
    #side-bar .orders-sub-row:hover{
      background-color: rgb(252, 239, 239);
    }


  #side-bar .SVG{
    width: 25px;
    height: 25px;
    background-color: transparent;
  }

    #side-bar span{
    font-family: 'B Roya';
    font-size: 1.3rem;
  }
  #side-bar span:nth-of-type(2){
    margin-bottom: 20px;
  }
  #side-bar .crediteResidue{
    font-size: 0.8rem;
    color: rgb(99, 11, 163);
    display: flex;
    align-items: center;
    cursor: pointer;
    align-self: flex-start;
   }
   #side-bar .forms{
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 0px 30px !important;
    margin: 5px auto;
    gap: 10px;
    font-family: var(--main-font-family);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #2f3542;
    align-self: center;
    padding: 2px 10px;
  }
  #side-bar .mobilenumber{
    font-size: 1rem !important;
    margin-top: -10px !important;
   }
   #side-bar .customer {
    align-self: center;
    white-space: nowrap;
  }
  #side-bar .customerName {
  color: #1a66ea;
  }
  #side-bar .mandeHesab {
    font-size: 0.8rem !important;
    display: none;
    margin-top: 2px;
  }
  #side-bar .increaseCredit{
  margin-top: 10px;
   }
  

  .pageTitle{
    font-family: var(--main-font-family);
    font-size: 1.3rem;
    border-radius: 5px;
    padding: 5px 10px;
    background-color: red;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    color: white;
    
  }
  #main-cart .barresiHazfContainer{
    display: flex;
    width: 100%;
    margin: 5px 0;
  }
  #main-cart .preBarresi{
    width: 70%;
    margin-bottom: 80px;
  }
  #main-cart .barresiHazfContainer{
    display: flex;
    width: 100%;
    margin: 5px 0;
  }
  #main-cart .buttons{
    background-color: red;
    color: white;
    padding: 2px 15px;
    border-radius: 5px;
    border: none;
    font-family: var(--main-font-family);
    font-size: 1.2rem;
    font-weight: bold;
  }
  
  #main-cart .firstTh{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    background-color: transparent;
  }
  #main-cart .firstTd{
    display: flex;
    flex-direction: row;
    gap:5px;
    justify-content: center;
    align-items: center;
    gap:8px;
    background-color: transparent;
  }
  #main-cart .checkboxes{
    width: 13px;
    height: 13px;
  }
  #main-cart .Td{
    max-width: 10px !important;
    font-size: 0.9rem !important;
    white-space: normal !important;
      }
      #main-cart .cartPriceTakmili{
        width: 90%;
        max-width: 90%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        background-color: #fff;
        border: 1px solid #aaa;
        overflow: hidden;
        word-break: break-word;
        overflow-wrap: break-word;
      }
      #main-cart .tdDiv{
        width: 100%;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word; 
        background-color: transparent !important;
        display: flex;
        flex-direction: column;
        
      }
      #main-cart .tdDiv span{
        background-color: transparent;
  
      }
  #main-cart .cartPriceTakmili *{
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  #main-cart td.tdTakmili{
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    vertical-align: middle;
    text-align: center;
    box-sizing: border-box;
    background-color:white;
  }
  
   .price-Row{
    /* display: none; */
    margin: 0;
    font-size: 13px;
    padding:0 5px;
    display: flex;
    justify-content: space-between;
  }
  .price-Row-div{
    width: 70%;
    display: flex;
    margin: 5px 0;
    justify-content: right;
  
  }
  .price-Row-span{
    display: flex;
    flex: 1;
    margin: 5px 0;
    justify-content: left; 
    background-color: transparent;
  }
  #main-enter .messageModal.active {
    opacity: 1;
    visibility: visible;
  }
  #main-products{
    display: flex;
    width: 100%;
  }
  #main-products .p-page-container{
    display: flex;
    flex-direction: column;
    border: none;
  
      width: 22%;
      padding: 10px;
      gap: 5px;
      display: flex;
      flex-direction: column;
    }
    #main-products .filters{
      padding: 5px 5px;
      border-radius: 10px;
    border: 1px solid var(--main-border-color);
      display: flex;
      flex-direction:column;
      gap: 10px;
      align-items: center;
      background-color: white;
    }
    #main-products .filtering{
      width: 100%;
      display: flex;
      flex-direction: row;
      gap: 8px;
      background-color: white;
      padding: 3px 10px;
      align-items: center;
      justify-content: space-between;
      border-radius: 2px;
      }
      #main-products .left{
        width: 78%;
        padding:10px;
        display: flex;
        flex-direction: column;
        border: none;
        box-sizing: border-box;
        gap: 10px;
       }
       #main-products .sorting{
        display: flex;
        gap: 10px;
        justify-content:end;
        border-radius: 10px;
        border: 1px solid var(--main-border-color);
        padding: .5rem 1.5rem;
      }
      #main-products .priceSort{
        background-color: red;
        border: none;
        border-radius:5px;
        padding: 2px 10px;
        color: white;
        cursor: pointer;
      }
      #main-products .products-container{
        width: 100%;
        gap: 10px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      } 
      #main-products .prevNext {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
        direction: rtl;
      }
      #main-products .hidden{
        display: none;
      }
      #main-products .prevNextBtn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid #ddd;
        background: #fff;
        color: #333;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      
      #main-products .prevNextBtn:hover {
        background: #f1f2f6;
      }
      #main-products .active-page {
        background: red !important;
        color: #fff !important;
        border-color: #57606f !important;
      }
      #main-products .pagination-dots {
        padding: 0 6px;
        color: #777;
      }
      #main-products .filtersRow{
        display: flex;
        flex-direction: row;
        gap:15px;
        padding: auto 20px;
        width: 100%;
        background-color: white;
      }
      #main-products .cartDiv{
        display: flex;
        flex-direction: column;
        cursor: pointer;
        border-radius: 10px;
        border: 1px solid var(--main-border-color);
        flex-wrap: wrap;
        /* padding: 5px; */
        align-items: center;
        background-color: white;
        } 
        #main-products .cartDiv span {
          display: block;
          word-wrap: break-word; /* اجازه شکستن کلمات خیلی طولانی */
          overflow-wrap: break-word; /* استاندارد جدیدتر */
          text-align: center;
          background-color: white;
         }
         #main-products .priceDiv{
          width: 100%;
          background-color: #57606f;
          color: white;
          text-align: center;
          padding: 5px 0;
          margin-bottom: 10px;
        }
        /*end of products*/
        /*start of product*/
        #main-product{
          display: flex;
          max-width: 1100px;
          margin: 10px auto;
          box-shadow: 0 0 10px rgba(0,0,0,0.2);
             }
             #main-product .form {
              width: 55%;
              /* background: #fff; */
              padding: 1rem;
              border-radius: 5px;
              background-color: white;
            }
            #main-product .faktorTitle {
              margin-top: -10px;
              padding: 10px;
              font-weight: bold;
              font-size: 25px;
              background-color: transparent;
            }
            #main-product .form-row {
              display: flex;
              flex-direction: row;
              margin-top: 5px;
              align-items: center;
              justify-content: space-between;
              background-color: white;
              margin-bottom: 0;
            }
            #main-product .onvaneSefaresh ,#main-product .tedad {
              font-size: 1rem;
              padding: 20px;
              background-color: transparent;
              }
              #main-product .title-input:hover{
                border: 1px solid black;
               }
               #main-product .title-input:focus{
                /* border: 1px solid black; */
                outline: 1px solid black;
               }
      
               #main-product .title-input::placeholder{
              font-size: .8rem;
              }   
              #main-product .title-input {
                width: 70%;
                height: 2rem;
                  font-size: 1rem;
                  border: 1px solid black;
                  /* font-size: 1.3rem; */
                  padding-right: 5px; 
                  border-radius: 2px;
                
                }
                #main-product .elzami ,#main-product .imageWarning{
                  display: none;
                  color: #ee0101;
                  margin-top: -2px;
                  margin-right: 10px;
                  font-family: "BNazanin", Tahoma, sans-serif; /* فونت فارسی */
                  font-weight: bold;
                  font-size: 12px;
                  animation: blink-animation 4s infinite; /* کندتر و آرام */
                  margin-bottom: 1px;
                }   
                #main-product .quantitySelect {
                  width: 71%;
                  height: 2.3rem;
                    font-size: 1rem;
                    border: 1px solid black;
                    border-radius: 5px;
                padding: 0 10px;
                  }
                  #main-product .sar-Titr{
                    background-color: rgb(255, 255, 0);
                    padding: 1px 10px;
                    display: inline-block;
                  margin-top: 15px;
                  border-radius: 8px;
                  font-weight: bold;
                  }       
                  #main-product .tarhForm{
                    display: flex;
                    flex-direction: column;
                    background-color: #fff;
                    border: 2px solid rgb(138, 138, 140);
                    border-radius: 5px;
                  }
                  #main-product .TarrahiForm{
                    display: flex;
                    flex-wrap: wrap;
                    align-items: flex-start;
                    column-gap: 30px;
                    row-gap: 10px;
                    padding: 10px;
                  }
                  #main-product .Label{
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    gap: 5px;
                    background-color: transparent;
                  }
                  #main-product .kadreUpload{
                    border-radius: 5px;
                    margin-top: 2px;
                    border: 2px solid rgb(140, 138, 138);
                    flex-direction: column;
                    gap: 10px;
                    padding: 10px;
                    background-color: #fff;
                    justify-content: center;
                    align-items: center;
                    display: none;
                  }
                  #main-product .upload-box input[type="file"] {
                    position: absolute;
                    inset: 0;
                    opacity: 0;
                    cursor: pointer;
                }
                #main-product .imageContainer{
                  display: flex;
                  flex-direction: column;
                }
                #main-product .imageDiv{
                  width: 100%;
                  max-width: 100%;
                  display: flex;
                  flex-direction: row;
                  gap: 1rem;
                  align-items: center;
                  background-color: white;
                  font-size: 0.8rem;
                  
                }
                #main-product .imageDiv span{
                background-color: transparent;
                cursor: pointer;
                }
  
               
                #main-product .upload-box {
                  width: 250px;
                  height: 100px;
                  border: 2px dashed #999;
                  background: #fff;
                  margin: 0;
                  position: relative;
                  border-radius: 8px;
                  overflow: hidden;
                  cursor: pointer;
                  padding: 10px;
                  border: 1px dashed #aaa;
                  transition: all 0.3s ease;
                }
                #main-product .upload-title {
                  background: #000;
                  color: #fff;
                  text-align: center;
                  padding: 8px 0;
                  font-size: 14px;
                  pointer-events: none;
                }
                #main-product .upload-content {
                  height: calc(100% - 64px);
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  pointer-events: none;
                  font-size: 13px;
                  color: #333;
                }
                #main-product .upload-footer {
                  text-align: center;
                  font-size: 12px;
                  color: #555;
                  padding: 6px 0;
                  pointer-events: none;
                }
                #main-product .barresiHashieBoresh ,#main-product .formeShomareFaktor ,#main-product .zirebargardanForm ,#main-product .FormeModelSahafi{
                  border:2px solid rgb(140, 138, 138);
                  border-radius: 5px;
                  margin: 0;
                  display: flex;
                  flex-direction: column;
                  }
                  #main-product .hashie-boresh ,#main-product .ToziheShomareFaktor ,#main-product .sahafiModel {
                    color: #000;
                    padding:10px;
                    margin: 0;
                    }
                    #main-product .highlight-link{
                      color: rgb(245, 7, 7);
                      text-decoration: none; /* خط زیر متن را حذف می‌کند */
                    }
                    #main-product .anjame-barresifile ,#main-product .shomareFaktor ,#main-product .zireOk-notOK {
                      display: flex;
                      gap: 110px;
                      padding-right: 10px;
                      justify-content: flex-start;
                      margin-bottom: 10px;
                    }  
                    #main-product .shomareRange{
                      display: none;
                      background-color: rgb(255, 255, 255);
                    }
  
                    #main-product .shomare ,#main-product .shomare input {
                      background-color: white;
                      padding: 0 5px;
  
                    }
  
                    #main-product .tooltip-circle .tooltiptex {
                      position: relative;
                      display: inline-block;
                      width: 15px;
                      height: 15px;
                      background-color: #ee0101; /* رنگ دایره */
                      color: #fff;
                      border-radius: 50%;
                      text-align: center;
                      line-height: 18px;
                      font-weight: bold;
                      cursor: pointer;
                      font-family: Tahoma, sans-serif;
                      font-size: 14px;
                    }
                    #main-product .tooltip-circle:hover .tooltiptext {
                      visibility: visible;
                      opacity: 1;
                    }
                    #main-product .shomareForm{
                      display: none;
                      flex-direction: column;
                       padding: 3px;
                      border: 2px solid rgb(138, 138, 140);
                      border-radius: 5px;
                      background-color: #fff;
                      margin-top: 2px;
                    }
                    #main-product .shomareForm p:first-of-type,
                    #main-product .shomareForm p:nth-of-type(3){
                      align-self: flex-start;
                      background-color: rgb(255, 255, 0);
                      padding: 3px 10px;
                      display: inline-block;
                    margin-top: 5px;
                    border-radius: 8px;
                     }
                     #main-product .shomareForm p:nth-of-type(2), #main-product .shomareForm p:nth-of-type(4){
                    margin: -15px 2px 2px 0;
                    padding: 0;
                    background-color: #ffffff;
                   }
                   #main-product .shomare-input{
                    min-height: 35px;
                    padding: 6px 10px;
                    box-sizing: border-box;
                   
                  }
                  #main-product .Tozih-input{
                    min-height: 35px;
                    padding: 6px 10px;
                    box-sizing: border-box;
                  }
                  #main-product .sahafiForm{
                    display: flex;
                    gap: 100px;
                    background-color: #f3f1f1;
                    padding: 15px;
                    border-radius:5px;
                    margin: 2px;
                    }
                    #main-product .formTarrahi ,#main-product .formSahafi{
                      display: flex;
                      flex-direction: column;
                      border: 2px solid rgb(138, 138, 140);
                      border-radius: 5px;
                        }
                        #main-product .jahatSahafi{
                          display: flex;
                        gap: 150px;
                        background-color: #f3f1f1;
                        padding: 15px;
                        border-radius:5px; 
                        }
                        #main-product .khadamatEzafi{
                          border: 2px solid rgb(138, 138, 140);
                          border-radius: 5px;
                          display: grid;
                          grid-template-columns: repeat(2, 1fr);
                          row-gap: 15px;
                          padding:10px;
                        }
                        #main-product .toziheZire {
                          color: #000;
                          padding:2px 10px;
                          margin: 0;
                          display: inline-block;
                          }
                          #main-product .tozihatTakmili{
                            width: 100%;
                              resize: none;      /* کاربر نتونه بکشه بزرگ کنه */
                              overflow-y: auto;  /* اسکرول عمودی */
                            font-size: 16px;
                            padding: 5px;
                            font-family: "B Nazanin", "BNazanin", Tahoma, Arial, sans-serif;
                         }
                         #main-product .content {
                          display: flex;
                          flex: 1;
                          flex-direction: column;
                        } 
                        #main-product .floating-box {
                          position: sticky;
                          top: 5px;
                          background: white;
                          box-shadow: 0 0 15px rgba(0,0,0,0.25);
                          padding: 10px;
                          font-weight: bold;
                        } 
                        #main-product .faktor-title{
                          font-size: 18px;
                          background-color: transparent;
                        
                        }
                        #main-product .priceDescription{
                          display: flex;
                          justify-content: space-between;
                          margin: 5px 0;
                          background-color: transparent;
                        }
                        #main-product .priceDescription div{
                          background-color: transparent;
                        } 
                        #main-product .priceTakmilii{
                          display: none;
                          flex-direction: column;
                          margin: 20px 0;
                          background-color: rgb(255, 255, 255);
                          border: 1px solid #aaa;
                        }
                        #main-product .price-Row{
                          margin: 0;
                          font-size: 13px;
                          padding:0 5px;
                          display: flex;
                          justify-content: space-between;
                        }
                  
                        #main-product .price-Row div{
                          width: 70%;
                          display: flex;
                          margin: 5px 0;
                          justify-content: right;
                  
                        }
                        #main-product .price-Row span{
                          display: flex;
                          flex: 1;
                          margin: 5px 0;
                          justify-content: left; 
                        }
                        #main-product .finalGhimat{
                          color: rgb(51, 187, 17);
                          margin-right: 70px;
                          }
  
                          #main-product .finalPrice{
                            margin-left: 50px;
                            color: rgb(255, 0, 0);
                          }
                          #main-product .sabteSefaresh{
                            display: flex;
                            justify-content: center; /* وسط افقی */
                            align-items: center;     /* وسط عمودی */
                            background-color: transparent;
                          }
                          #main-product .submitBtn {
                            background: linear-gradient(45deg, #f39c12, #e67e22); /* گرادیانت جذاب */
                            color: white;
                            border: none;
                            padding: 5px 30px;
                            border-radius: 12px; /* گوشه‌های گرد */
                            cursor: pointer;
                            font-size: 18px;
                            font-weight: bold;
                            box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* سایه زیبا */
                            font-family: "B Nazanin", "BNazanin", Tahoma, Arial, sans-serif;
                          
                          }
                          
                          #main-product .submitBtnr:hover {
                            background: linear-gradient(45deg, #e67e22, #f39c12); /* معکوس گرادیانت */
                            transform: translateY(-3px); /* کمی بالاتر رفتن */
                            box-shadow: 0 8px 20px rgba(0,0,0,0.4);
                          }
                          
                          #main-product .submitBtn:active {
                            transform: translateY(1px); /* حالت کلیک */
                            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
                          }
                          #main-product .desciption {
                            background: rgb(255, 255, 255);
                            padding: 20px;
                            min-height: 600px;
                            margin-top: 10px;
                            font-size: 15px;
                          }
                          #main-product .mustLoginModal ,#main-product .imageModal{
                            position: fixed;
                            inset: 0;
                            background: rgba(0,0,0,0.5);
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            opacity: 0;
                            visibility: hidden;
                            transition: 0.3s;
                          }
                          #main-product .mustLoginModal.active ,#main-product .imageModal.active{
                            opacity: 1;
                            visibility: visible;
                          }
                          #main-product .mustLoginModal {
                            z-index: 1000;
                          }
                          #main-product .imagePrev{
                            height: 500px;
                            width: 100px;
  
  
                          }
   /* end   of    main-product */
  
   /* start main-faktor */
   #main-faktor{
    width: 80%;
    display: flex;
    flex-direction: column;
    margin: 10px auto;
  }
  #main-faktor .faktorList{
    width: 60%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
    margin: 10px auto;
  
  }
  #main-faktor .faktorList div{
    background-color: rgb(124, 147, 236);
    text-align:center;
    padding: 5px;
    font-family: 'B Roya';
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
  }
  #main-faktor .sizes{
    display: flex;
    flex-direction:column;
    width: 15%;
    gap: 1px;
    background-color: rgb(255, 255, 255);
  }

  #main-faktor .btn:hover ,#main-faktor .btn.is-hover{
    background-color: var(--main-background-color);
    border-right: 4px solid red;
    border-top: none;
    border-left: none;
    border-bottom: none;
  }
  #main-faktor.btn:focus{
    font-size: 1.4rem;
    border-right: 2px solid red !important;
  }
  #main-faktor .price-table th:first-child{
    border-top-right-radius: 5px;
  }
  #main-faktor .price-table th:last-child{
    border-top-left-radius: 5px;
  }
  #main-faktor .tozihat{
    font-size: 1.2rem;
    font-family: var(--main-font-family);
    padding: 1rem !important;
    background-color: var(--main-background-color);
    
  }
  
  
  
  
  
  
  /* ********************************** */
  .container{
      display: flex;
      flex-direction: row;
      width: 90%;
      margin: 50px auto;
      
      /* background-color: black; */
  }
  #main-faktor .faktorList{
    width: 60%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
    margin: 10px auto;
  
  }
  #main-faktor .faktorList div{
    background-color: rgb(124, 147, 236);
    text-align:center;
    padding: 5px;
    font-family: 'B Roya';
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
  }
  #main-faktor .tozihat{
    font-size: 1.2rem;
    font-family: var(--main-font-family);
    padding: 0.5rem;
    
  }
  #main-faktor{
    width: 80%;
    display: flex;
    flex-direction: column;
    margin: 10px auto;
  }
  
  
  .pageTitle {
  
    font-family: var(--main-font-family);
    
  }
  #main-faktor .sizes{
      display: flex;
      flex-direction:column;
      width: 18%;
      gap: 1px;
      background-color: rgb(255, 255, 255);
  }
  .btn{
      background-color: aqua;
      font-size: 1.2rem;
      border: none;
      cursor: pointer;
      padding: 8px;
      font-family: var(--main-font-family);
  
      
  }
  #main-faktor .btn:hover ,#main-faktor .btn.is-hover{
      background-color: var(--main-background-color)
  }
  #main-faktor.btn:focus{
      font-size: 1.4rem;
      border-right: 2px solid red !important;
  }
  .price-table{
    width: 95%;
    margin: 5px auto;
  }
  .price-table th{
      font-size: 1.2rem;
      background-color: red;
  /* border: 1px solid red; */
  padding: 10px;
  color: white;
  
  }
 
  .price-table td{
      font-size: 1.2rem;
      background-color: rgb(255, 255, 255);
  border-bottom: 1px solid rgb(221, 219, 219);
  padding: 10px;
  }
  .price-table tr:nth-child(odd) td{
      background-color: rgb(249, 245, 245);
  }
  .price-table tr:nth-child(even){
      background-color: rgb(36, 11, 85);
  }
  
  /* th :last-child{
      border-radius:5px !important ;
  } */
  /* table {
      border-collapse: collapse;
      width: 95%;
      margin: 5px auto;
      border-radius: 5px;
      text-align: center;
      padding: 15px;
      font-family: 'B Roya';
    } */
    #main-faktor .pages {
      width: 82%;
      min-height: 50px; /* برای اینکه مطمئن شویم عنصر در فکس باکس فشرده نمی‌شود */
      background-color: var(--main-background-color);
      
      opacity: 0;
      transition: opacity .8s ease; 
  }
  #main-faktor .Daraeepages {
    width: 100%;
    min-height: 50px; /* برای اینکه مطمئن شویم عنصر در فکس باکس فشرده نمی‌شود */
    background-color: var(--main-background-color);
    
  }
  .axFaktor img{
    display: block;
    max-width: 100%;
    height: auto;
  
  }
  
  #main-faktor .pages.show {
      opacity: 1;
  }
    .price-wrap{
      display: flex;
      align-items: center;
      justify-content: center;
      align-content:center ;
      gap: 12px;
    }
    .price-wrap a{
      font-size: 1rem;
      /* background-color: yellow; */
      padding: 2px;
      text-decoration: none;
    }
    .bigContainer{
      margin: 10px auto;
      display: flex;
      flex-direction: column;
      width: 80%;
    }
    .mediumContainer{
      display: flex;
      width: 100%;
    }
    .tozihFaktor{
      display: flex;
      flex-direction: column;
      width: 55%;
      font-size: 1.2rem;
  font-family: var(--main-font-family);
  text-align: justify;
      padding: 15px;
    }
    .tozihFaktor span{
      font-weight: bold;
    }
    .axFaktor{
      width: 45%;
      background-color: transparent;
    }
    #main-faktor{
      direction: rtl;
      width: 80%;
      display: flex;
      flex-direction: column;
      margin: 10px auto;
    }
    #main-faktor .price-td{
      display: flex;
      width: 100%;
      background-color: transparent;
      align-items: center;
      gap: 2rem;
      justify-content: center;
  
    }
    
    .imgS ,.imgs{
      width:20px;
       height:10px;
       background-color: transparent;
    }
 
    .pngS{
      display: none;
      width: 12px;
      height: 12px;
      background-color: transparent;
      cursor: pointer;
    }
  
    .Daraee-container{
      display: flex;
      flex-direction: row;
      width: 90%;
      margin: 50px auto;
  }
  #main-product .imagePrev{
    font-family: var(--main-font-family);
    background: white;
    padding: 0;
    border-radius: 12px;
    min-width: 70vw;
    max-width: 90vh;
    min-height: 70vh;
    max-height: 90vw;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    flex-direction: column;
    color: black;
    align-items: center;
    display: flex;
    margin-bottom: 1px;
  }
  #main-product .imagePrev img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    margin: 0;
    box-sizing: border-box;
    /* جلوگیری از مشکل اندازه پیش‌فرض آیتم Flex */
    min-width: 0;
    min-height: 0;
    padding: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  }
  #main-product .imagePrev span {
    width: 100%;
    display: flex;
    padding: 0 0 0 10px;
    justify-content: flex-end;
    background-color: #ee0101;
    margin: 0;
    border-top-right-radius: 12px;
    border-top-left-radius: 12px;
    color: white !important;
    cursor: pointer;
    font-size: 2.5rem;
    line-height: 1.2;
  }
  #main-product .errorSpan{
    color: red;
  }
  .btr-canceled{
    color: #62666d;
  }
  #ready-to-pay{
    width: 70%;
    margin: auto;
    border-radius: 5px;
    border: 1.5px solid var(--main-border-color);
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;

  }
  #ready-to-pay .Tuman, #main-cart .Tuman{
    font-size: 1.2rem;
    color: red;
    margin-right: 3px;
    background-color: transparent;
  }
  #ready-to-pay div{
    background-color: transparent;
  }
  #ready-to-pay span{
    background-color: transparent;
  }
  #ready-to-pay .totalPrice{
    font-size: 1.2rem;
    margin-right: 2px;
    background-color: transparent;
  }
  #gate-choice{
    font-size: 0.8rem;
    cursor: pointer;
  }
  #gate-choice.active{
    cursor: pointer;
    color: blue;
  }
  #ready-to-pay .gates{
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    border: none;
    border-bottom: 2px solid black;
  }
  #ready-to-pay .gates:hover{
    border: none;
    border-bottom: 2px solid blue;
  }
  #ready-to-pay .gatesDropDown {
    position: absolute;
    display: flex;
    flex-direction: column;
    display: none;
    top: 103%;
    /* transform: translateX(-30%); */
    background-color: white;
    padding: 5px;
    box-shadow: inset;
    width: 130%;
    left: -50%;

    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 9999;

    left: 50%;
    transform: translateX(-50%);
  }
  #ready-to-pay .gatesDropDown.active{
    display: flex;
    cursor: auto;

  }
  #ready-to-pay .gates-item{
padding-right: 5px;
cursor: pointer;
  }
  #ready-to-pay .gates-item:hover,#ready-to-pay .is-hover{
    background-color: #f4f6f9;
  }
  #ready-to-pay .pay-back-cart{
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-top: 1rem;
  }
  #ready-to-pay .pay-back-cart .rotate-180 {
    transform: rotate(180deg);
  }
  #ready-to-pay .table{
    width: 80%;
    max-width: 80%;
    margin-top:0.5rem ;
    margin-bottom: 0.5rem;
  }
  .ready-table{
    width: 100%;
    border-collapse: collapse;

  }
  .ready-table th {
    font-size: 1.2rem;
    border: 1px solid #ddd;
    white-space: nowrap; /* مانع شکستن متن */
    text-align: center;
    background-color: rgb(231, 229, 229) !important;
    padding: 5px;
}
.ready-table td {
  padding: 12px;
  border: 1px solid #ddd;
  white-space: nowrap;
  text-align: center;
  font-size: 1rem;

}

 

