/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       MajidS
 Template:     woodmart
 Version:      1.0.0
*/

/* ==== کارت محصولات سبک و بهینه ==== */

/* کارت محصول */
.products li.product {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 380px;
  background: #fff;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #eee;
  margin-bottom: 20px;
}

/* تصویر محصول با نسبت ثابت (جلوگیری از پرش محتوا) */
.products li.product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 4px;
}

/* عنوان محصول */
.products li.product .woocommerce-loop-product__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  min-height: 40px; /* جای دو خط */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

/* قیمت محصول */
.products li.product .price {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-top: auto;
}

/* دکمه خرید */
.products li.product .button {
  margin-top: 10px;
}

/* نسخه موبایل */
@media (max-width: 768px) {
  .products li.product {
    min-height: 320px;
    padding: 12px;
  }
  .products li.product img {
    aspect-ratio: 1 / 1.1; /* تصویر کمی مستطیلی‌تر برای موبایل */
  }
}
