.custom-product-table {
  border-collapse: collapse;
  width: 100%;
  
}

.custom-product-table th,
.custom-product-table td {
  border: 1px solid #ddd;
  padding: 5px;
  text-align: right;
  /* min-width: 150px; */
}
.custom-product-table td {
  font-size: 12px;
  height: 100%; /* Make cells take full height */
  vertical-align: top; /* Align content to top (or middle/bottom as needed) */
}
.custom-product-table th {
  background-color: #f4f4f4;
  font-weight: bold;
  font-size: 13px;
  text-align: right;
  height: 100%; /* Make cells take full height */
  vertical-align: top; /* Align content to top (or middle/bottom as needed) */
}

.custom-product-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.custom-product-table tr:hover {
  background-color: #f1f1f1;
}

.custom-product-table img {
  max-width: 100%;
  height: auto;
  display: block;
}

.lab-filters {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: scroll;
  gap: 7px;
}
.lab-filters .filter-group {
  min-width: 250px;
  height: 320px;
  overflow: hidden;
  background: #f7f7f7;
  border-radius: 10px;
  padding: 15px 10px;
}
.lab-filters .filter-group h4 {
  font-size: 14px;
  margin: 0;
}
.search-this-filter {
  width: 100%;
  padding: 0 5px;
  font-size: 12px;
  margin: 5px;
}
.lab-filters .filter-group label {
  font-size: 13px;
}
.lab-filters .filter-group-container {
  height: calc(100% - 70px);
  overflow-y: scroll;
  direction: ltr;
  padding-right: 5px;
}
.lab-filters .filter-group-container * {
  direction: rtl;
}

/* استایل برای جدول رسپانسیو */
.table-responsive {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* برای اسکرول نرم در دستگاه‌های موبایل */
  position: relative;
  border-radius: 10px;
  border: 1px solid #eaeaea;
}

/* فیکس کردن ستون اول */
.custom-product-table .fixed-column {
  position: sticky;
  right: 0;
  background-color: #f9f9f9;
  z-index: 2; /* برای اطمینان از اینکه ستون بالای سایر عناصر قرار گیرد */
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* سایه برای جدا کردن ستون */
}
@media(max-width:768px){
  .custom-product-table .fixed-column {
    position: static;
    
  } 
}

.table-responsive.active {
  cursor: grabbing; /* نشانگر ماوس به حالت کشیدن تغییر می‌کند */
  cursor: -webkit-grabbing;
}
.pagination-button.active {
  background-color: #3498db;
  color: #fff;
  border: 1px solid #3498db;
  cursor: default;
}

/* استایل برای ستون محصول */
.lab-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-info-container {
  display: flex;
  gap: 10px;
}

.product-image {
  flex-shrink: 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.product-details p {
  margin: 0;
  font-size: 13px;
  color: #333;
}

.product-details p a {
  color: #3498db;
  text-decoration: none;
}

.add-to-cart-btn:hover {
  background-color: #2874a6;
}

.lab-product-cell {
  min-width: 350px !important; /* حداقل عرض ستون اول */
}

/* تنظیم حداقل عرض برای ستون دوم */
.lab-details-cell {
  min-width: 200px !important; /* حداقل عرض ستون دوم */
}

/* استایل برای ستون جزئیات محصول */
/* .lab-details-cell {
    padding: 10px;
    font-size: 14px;
    color: #333;
} */

/* استایل برای قیمت و موجودی */
.product-price p,
.product-stock p {
  margin: 5px 0;
}
.product-price{
  text-align: center !important;
}

/* استایل برای فرم افزودن به سبد خرید */
.lab-product-add-to-cart .cart {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 5px;
}

/* استایل برای فیلد تعداد */
.lab-quantity-input {
  max-width: 45px !important;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
}

/* استایل برای دکمه افزودن به سبد خرید */
.lab-add-to-cart-btn {
  padding: 0px 5px !important;
  background-color: #0662ea !important;
  color: #fff !important;
  border: none !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-size: 12px !important;
}

.lab-add-to-cart-btn:hover {
  background-color: #2874a6;
}
.lab-th-sort svg {
  transition: transform 0.3s ease; /* انیمیشن چرخش */
}
.lab-th-sort {
  float: left;
  display: block;
  margin-left: 5px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.filter-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#clear-filters-btn {
  display: none;
  background-color: #5b6064;
  color: #fff !important;
  margin-right: 1rem;
}
.remove-this-filter-btn {
  background: #d2d1d1;
  padding: 3px;
  width: 100%;
  display: none;
  font-size: 12px;
  text-align: center;
  color: #333;
  cursor: pointer;
}
/* Filter Bar */
#filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f1f1f1;
  padding: 10px;
  margin: 20px 0;
  border-radius: 5px;
  gap: 20px;
}

.filter-bar-right {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.filter-bar-left {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.filter-bar-center {
  flex: 4;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

#active-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  /* overflow-x: scroll;
  width: max-content;
  flex-wrap: nowrap; */
}

.filter-card {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  padding: 0px 15px;
  border-radius: 5px;
  font-size: 13px;
  color: #333;
}

.filter-card .remove-filter-btn {
  background: none;
  border: none;
  color: #ff0000;
  font-size: 14px;
  cursor: pointer;
  padding: 5px;
}

#apply-filters-btn {
  padding: 10px 20px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#results-count {
  font-size: 16px;
  color: #333;
}

/* Loading Card */
#loading-card {
  display: none;
  text-align: center;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
  max-width: 300px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
}

#loading-card svg {
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

#cur-cat-id {
  display: none;
}

/* Product Image */
.product-image {
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 5px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination-button {
  padding: 5px 10px;
  margin: 0 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
}

.pagination-button.active {
  background-color: #3498db;
  color: #fff;
  border-color: #3498db;
}

/* Add to Cart Form */
.lab-quantity-input {
  width: 60px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
}

.lab-add-to-cart-btn {
  padding: 5px 15px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


/* استایل برای حالت موبایل */
@media (max-width: 768px) {
  .lab-filters .filter-group {
    min-width: 75%; /* فیلترها 50 درصد عرض صفحه */
  }
  .lab-product-cell {
    min-width: 150px !important; /* حداقل عرض ستون اول */
  }
  .filter-bar-right {
    flex: 1 1 65%; /* عرض 48 درصد */
    display: flex;
    justify-content: center; /* تنظیم محتوا در مرکز */
    align-items: center;
    order: 1; /* ترتیب اول */
  }

  .filter-bar-left {
    flex: 1 1 30%; /* عرض 50 درصد */
    display: flex;
    justify-content: center; /* تنظیم محتوا در مرکز */
    align-items: center;
    order: 2; /* ترتیب دوم */
  }

  .filter-bar-center {
    flex: 1 1 100%; /* عرض 100 درصد */
    display: flex;
    justify-content: center; /* تنظیم محتوا در مرکز */
    align-items: center;
    margin-top: 10px; /* فاصله از بخش‌های بالا */
    order: 3; /* ترتیب سوم */
  }

  #filter-bar {
    flex-wrap: wrap; /* اجازه به پیچیدن بخش‌ها */
    gap: 10px; /* فاصله بین بخش‌ها */
  }
  .lab-filters .filter-group h4 {
    font-size: 12px;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  background-color: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  font-size: 13px;
  max-width: fit-content;
  margin-bottom: 1rem;
}
@media(max-width:768px){
  .breadcrumb{
    overflow-x: auto;
  }
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  position: relative;
}

.breadcrumb-item a {
  text-decoration: none;
  color: #666;
  padding: 5px 12px !important;
  background-color: #e8e8e8;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

/* .breadcrumb-item a:hover {
  background-color: #d0d0d0;
} */

.breadcrumb-item.active,.breadcrumb-item.active a {
  background-color: #666;
  color: white;
  padding: 8px 12px;
  white-space: nowrap;
}

.breadcrumb-item:not(:last-child):after {
  content: '';
  position: absolute;
  left: 0px;
  top: -8px;
  width: 0;
  height: 0;
  border-right: 13px solid #e8e8e8;
  border-top: 27px solid transparent;
  border-bottom: 27px solid transparent;
  z-index: 2;
}

/* .breadcrumb-item:not(:last-child):hover:after {
  border-right-color: #d0d0d0;
} */

.breadcrumb-item:not(:first-child) {
  margin-right: -12px;
  padding-right: 20px;
}

.breadcrumb-item.active:after {
  border-right-color: #666;
}

.close-btn {
  background-color: #666;
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: #555;
}
.sortable-column{
  cursor: pointer;
}
.sortable-column.active{
  background-color: #caebf2;
}


.table-dual-wrapper {
  width: 100%;
  /* max-width: 900px; */
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  margin: 20px 0;
}

.table-top-scroll {
  height: 20px;
  overflow-x: scroll; /* Forces scrollbar to always be visible */
  overflow-y: hidden;
  scrollbar-width: thick; /* Options: auto, thin, thick */
  background: #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  /* Firefox scrollbar styles */
  scrollbar-color: #858585 #d0d0d0;
}

.table-top-scroll-content {
  height: 1px;
  /* Width set dynamically */
}

.table-main-scroll {
  /* height: 300px; */
  overflow-x: hidden;
  overflow-y: auto;
}

@media(max-width:768px){
  .table-main-scroll {
    
    overflow-x: auto;
    
  }
  
}

table {
  min-width: 100%;
  width: max-content; /* Expands to content width */
  border-collapse: collapse;
}

.custom-product-table th,.custom-product-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: right;
  white-space: nowrap;
  
}

.custom-product-table th {
  background: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.custom-product-table tr:nth-child(even) {
  background: #f9f9f9;
}

.custom-product-table tr:hover {
  background: #e3f2fd;
}

/* Compare functionality styles */
.lab-compare-column {
    width: 50px;
    text-align: center;
}

.lab-compare-cell {
    text-align: center;
    vertical-align: middle;
}

.product-compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#add-to-compare {
    display: none; /* Initially hidden */
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

#add-to-compare:hover {
    background-color: #45a049;
}

#add-to-compare:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.compare-actions {
    margin-bottom: 15px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Style for select all checkbox */
#select-all-products {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.custom-product-table th.checkbox-column{
  min-width: 30px !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-product-table td.checkbox-column{
  min-width: 30px !important;
  padding: 0;
  display: flex;
  justify-content: center;
}

/* Custom Scrollbar Styles for #topScroll2 */
#topScroll2::-webkit-scrollbar {
  width: 30px; 
  display: block;
}

#topScroll2::-webkit-scrollbar-track {
  background: #858585;
  border-radius: 9px;
}

#topScroll2::-webkit-scrollbar-thumb {
  background-color: #858585;
  border-radius: 9px;
  border: 2px solid #a5c3ef; /* Padding around the thumb, matching track color */
}

#topScroll2::-webkit-scrollbar-thumb:hover {
  background-color: #858585; /* Color on hover */
}
.filter-group > h4{
  white-space: nowrap;
}
.minimum-qty-message{
  background-color: #FF352B !important;
}