/* -------------------- صفحه محصول -------------------- */
.product-page {
  padding: 0;  
  margin: 0;
  background: #fafafa;
  font-family: "IRANSans", sans-serif;
  padding-bottom: 70px;
  direction: rtl;
}

/* ساختار کلی */
.product-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

/* دسکتاپ */
@media (min-width: 769px) {
  .product-container {
    flex-direction: row;
    padding: 0 20px;
    gap: 30px;
  }

  .image-gallery,
  .product-info {
    flex: 1;
  }
}

/* -------------------- حذف افکت فوکوس و لمس -------------------- */
a:focus, a:active,
button:focus, button:active {
  outline: none;
  box-shadow: none;
}

a, button {
  -webkit-tap-highlight-color: transparent;
}

.category-scroll a:focus,
.category-scroll a:active,
.product-card a:focus,
.product-card a:active {
  outline: none;
  box-shadow: none;
}

img, .product-card img, .thumbnail {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* -------------------- گالری تصاویر -------------------- */
.main-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
}

.main-image-container img {
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.4s ease;
}

/* تصاویر کوچک */
.thumbnails {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
  border-color: #ff6a00;
  opacity: 1;
  transform: scale(1.05);
}

/* -------------------- اطلاعات محصول -------------------- */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px;
  text-align: right;
}

/* عنوان */
.product-info h1 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

/* قیمت */
.product-info .price {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}
/* ✅ قیمت سمت چپ در صفحه محصول */
.product-info .price {
  text-align: left;
  
}
/* توضیحات */
.product-info .desc {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.9;
  color: #333;
  text-align: justify;
  border-top: 1px dashed #ddd;
  border-bottom: 1px dashed #ddd;
  margin-top: 4px;
  padding: 6px 0;
}

/* دکمه افزودن */
.add-to-cart {
  background: linear-gradient(135deg, #ff6600, #ff9100);
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 10px 18px;
  margin-top: 6px;
  border: none;
  cursor: pointer;
  align-self: flex-end;
  transition: all 0.2s ease;
}

.add-to-cart:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff9100, #ff6a00);
}

/* -------------------- پاپ‌آپ زوم تصویر -------------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.modal-content.zoomed {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.8);
  cursor: grab;
  touch-action: none;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  padding: 10px;
  cursor: pointer;
}

#nextBtn { right: 20px; }
#prevBtn { left: 20px; }

/* -------------------- موبایل -------------------- */
@media (max-width: 768px) {

  .product-container {
    gap: 4px;
  }

  .thumbnails {
    gap: 2px;
  }

  .thumbnail {
    width: 45px;
    height: 45px;
  }

  .product-info h1 {
    font-size: 16px;
  }

  .product-info .price {
    font-size: 18px;
  }

  .product-info .desc {
    font-size: 14px;
    line-height: 1.7;
  }

  .add-to-cart {
    font-size: 14px;
    padding: 8px 14px;
  }

}
