/* product-list.css */

/* استایل اصلی لیست محصولات */
.products-list {
  padding: 20px;
  padding-top: 260px;
  min-height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(
    to bottom,
    rgba(var(--theme-color-rgb), 0.05),
    rgba(var(--items-color-rgb), 0.02)
  );
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر پدینگ */
}

/* حالت جمع‌شده لیست محصولات */
.products-list.expanded {
  padding-top: 140px;
  min-height: calc(100vh - 140px);
}

/* اسکرول‌بار سفارشی */
.products-list::-webkit-scrollbar {
  width: 8px;
}

.products-list::-webkit-scrollbar-thumb {
  background: var(--items-color-adjusted-20);
  border-radius: 4px;
  transition: background 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

.products-list::-webkit-scrollbar-thumb:hover {
  background: var(--items-color-adjusted-30);
}

/* استایل بخش دسته‌بندی‌ها */
.category-section {
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(var(--items-color-rgb), 0.08);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییرات */
}

.category-section:hover {
  transform: translateY(-2px); /* افکت بالا آمدن برای نرمی */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* عنوان دسته‌بندی */
.category-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 25px 0;
  padding-bottom: 10px;
  position: relative;
  text-transform: capitalize;
  letter-spacing: 0.8px;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

.category-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--items-color-adjusted-20);
  border-radius: 2px;
  transition: width 0.4s ease; /* نرم‌تر کردن تغییر عرض */
}

.category-title:hover::after {
  width: 80px; /* افزایش عرض خط برای تعامل */
}

/* کانتینر محصولات (فقط حالت لیستی) */
.product-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* استایل هر آیتم محصول */
.product-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: var(--items-color);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  height: 120px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییرات */
}

.product-item:hover {
  transform: translateY(-3px); /* افکت بالا آمدن برای نرمی */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* wrapper تصویر محصول */
.product-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-left: 30px;
  flex-shrink: 0;
}

/* تصویر محصول */
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.4s ease; /* نرم‌تر کردن تغییر تصویر */
}

.product-image:hover {
  transform: scale(1.05); /* افکت زوم برای نرمی */
}

/* نشان ویژه (ستاره) */
.special-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--theme-color-adjusted-10);
  color: var(--text-color);
  padding: 4px;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییرات */
}

.special-badge:hover {
  transform: scale(1.1); /* افکت بزرگ‌نمایی برای نرمی */
}

/* اطلاعات محصول */
.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 0;
}

/* عنوان محصول */
.product-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* ویژگی‌های محصول */
.product-features {
  font-size: 0.8rem;
  color: var(--text-color-adjusted-10);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* علامت مثبت در ویژگی‌ها */
.feature-plus {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* تعداد ویژگی‌های باقی‌مانده */
.remaining-features {
  color: var(--items-color-adjusted-20);
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* اطلاعات قیمت */
.price-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

/* قیمت اصلی (قبل از تخفیف) */
.original-price {
  font-size: 0.8rem;
  color: var(--text-color-adjusted-10);
  text-decoration: line-through;
  opacity: 0.8;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* قیمت با تخفیف */
.discounted-price {
  font-size: 1.05rem;
  color: var(--text-color);
  font-weight: 700;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* واحد پول */
.currency {
  font-size: 0.8rem;
  color: var(--text-color);
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* موجودی محصول */
.stock {
  font-size: 0.75rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}

/* موجودی کم */
.stock.low-stock {
  font-weight: 600;
  color: var(--theme-color-adjusted-10);
}

/* آیکن موجودی */
.stock i {
  color: var(--items-color-adjusted-20);
  transition: color 0.4s ease; /* نرم‌تر کردن تغییر رنگ */
}