.qg-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.qg-product-card-wrapper {
  perspective: 1000px;
}
.qg-product-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  min-height: 260px;
  text-decoration: none;
  color: inherit;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.qg-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.14);
}
/* white overlay (70% opacity by default) */
.qg-product-card .qg-card-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.7);
  z-index: 1;
}
.qg-product-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px;
  min-height: 260px;
}
.qg-left-content {
  max-width: 55%;
}
.qg-product-title {
  margin: 0 10px 10px 0;
  font-size: 23px;
  line-height: 1.1;
  color: #222;
  font-weight: 700;
}
.qg-product-price {
  color: #8B4545;
  font-size: 18px;
  margin-bottom: 12px;
  margin-right: 9px;
	
}
.qg-add-to-cart {
  display: inline-block;
  background-color: #8B4545;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  margin-right:10px;
}
.qg-add-to-cart:hover { background-color: #6d3232;}
.qg-right-image {
  flex-shrink: 0;
  width: 34%;
  display: flex;
  justify-content: flex-end;
}
.qg-right-image a img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
/* Hover outline rectangle: centered and zooms (outline only) */
.qg-hover-rect {
  position: absolute;
  z-index: 1;
  left: 57%;
  top: 50%;
  width: 20%;
  height: 20%;
  border: 3px solid rgba(165,165,165,0.9); /* outline color */
  background: transparent;
  transform: translate(-50%, -50%) scale(0.6);
  transition: width 0.45s cubic-bezier(.2,.9,.2,1), height 0.45s cubic-bezier(.2,.9,.2,1), transform 0.45s, opacity 0.35s;
  opacity: 0.0;
  pointer-events: none;
  border-radius: 8px;
}
.qg-product-card:hover .qg-hover-rect {
  width: 80%;
  height: 83%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}


/* Responsive tweaks */
@media (max-width: 768px) {
  .qg-product-inner { padding: 18px; flex-direction: column; gap: 12px; align-items: stretch; }
  .qg-product-title { font-size: 20px; }
  .qg-right-image { width: 100%; display: flex; justify-content: center; }
  .qg-hover-rect { display: none; }
}

/* Mobile / Android improvements */
@media (max-width: 767px) {
  .qg-products-list {
    grid-template-columns: 1fr; /* یک ستون روی موبایل */
    gap: 16px;
  }

  .qg-product-card {
    min-height: auto !important; /* ارتفاع قابل انعطاف */
    border-radius: 12px;
  }

  .qg-product-inner {
    flex-direction: column-reverse !important;      /* محتوا ستونی شود */
    align-items: center !important;         /* وسط چین کردن محتوا */
    justify-content: center !important;
    padding: 16px !important;
    text-align: center !important;
    gap: 12px !important;
  }

  .qg-left-content {
    max-width: 100% !important;
  }

  .qg-product-title {
    font-size: 18px !important;
    margin: 0 0 8px 0 !important;
  }

  .qg-product-price {
    font-size: 16px !important;
    margin: 0 0 12px 0 !important;
  }

  .qg-add-to-cart {
    display: block !important;
    margin: 0 auto !important; /* وسط چین */
    padding: 10px 20px !important;
  }

  .qg-right-image {
    width: 50% !important;       /* تصویر کوچکتر */
    margin: 0 auto !important;   /* وسط چین کردن تصویر */
  }

  .qg-right-image img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  }

  .qg-card-overlay {
    background-color: rgba(255,255,255,0.6) !important;
  }

  .qg-hover-rect {
    display: none !important; /* حذف افکت hover روی موبایل */
  }
}

