/* Product Card Styles - فقط اصلاحات ضروری */

/* اصلاح نمایش تصاویر - override کردن app.css */
.product-card .product-card_img {
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  transition-property: all !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 500ms !important;
  padding: 0.5rem !important;
  box-sizing: border-box !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: block !important;
}

/* Container برای تصاویر محصول */
.product-card .product-image-container {
  position: relative !important;
  display: block !important;
  height: 11rem !important;
  overflow: hidden !important;
  background-color: transparent !important;
  width: 100% !important;
  border-radius: 0.5rem !important;
}

/* اطمینان از نمایش تصاویر */
.product-card .product-card_img[src] {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hover effect برای تصاویر دوم */
.product-card .product-card_img.opacity-0 {
  opacity: 0 !important;
}

.product-card .group:hover .product-card_img.group-hover\\:opacity-100 {
  opacity: 1 !important;
}

.product-card .group:hover .product-card_img.group-hover\\:opacity-0 {
  opacity: 0 !important;
}

/* اطمینان از عدم خروج از کادر */
.product-card {
  overflow: visible !important;
  position: relative !important;
}

.product-card .product-card_img {
  max-height: 100% !important;
  max-width: 100% !important;
}

@media (min-width: 360px) {
  .product-card .product-image-container {
    height: 8rem !important;
  }
}

@media (min-width: 480px) {
  .product-card .product-image-container {
    height: 9rem !important;
  }
}

@media (min-width: 1024px) {
  .product-card .product-image-container {
    height: 13rem !important;
  }
}

/* Tooltip styles */
.product-card .tooltip {
  position: relative;
  display: inline-block;
  z-index: 10;
}

.product-card .tooltiptext {
  visibility: hidden;
  width: 80px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 99999;
  bottom: 130%;
  left: 50%;
  margin-left: -40px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  font-size: 11px;
  transform: translateY(10px);
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-card .tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* استایل دکمه علاقه‌مندی در حالت فعال */
.add-to-favorites-btn.favorite-active {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

.add-to-favorites-btn.favorite-active:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

/* اضافه کردن فلش به تولتیپ */
.product-card .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Quick View Modal Styles */
#quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#quick-view-modal.hidden {
  display: none;
}

.quick-view-content {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.dark #quick-view-modal .quick-view-content {
  background: #1f2937;
  color: white;
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.success {
  background-color: #10b981;
}

.notification.error {
  background-color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .quick-view-content {
    padding: 1rem;
    margin: 1rem;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    top: 10px;
  }
}