/* ===== آرشیو فروشگاه: بک‌گراند لطیف و گرادیان مدرن ===== */
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag { 
  background: #fff !important; 
}

/* کانتینر صفحه آرشیو */
.az-shop .page-title {
  margin: 24px 0 16px !important;
  text-align: center !important;
  font: 900 28px/1.4 Vazir, system-ui !important;
  background: linear-gradient(90deg, #ff2958, #ff6b9d) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  padding: 0 12px !important;
}

/* تاپ‌بار: تعداد نتایج + مرتب‌سازی */
.az-topbar {
  
  gap: 16px !important;
  margin: 16px auto 12px !important;
  max-width: 1300px !important;
  padding: 0 12px !important;
  flex-wrap: wrap !important;
}

/* ===== گرید اختصاصی ما ===== */
.az-shop ul.products.az-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 28px 30px !important;
  justify-content: center !important;
  margin: 28px auto 48px !important;
  padding: 0 12px !important;
  list-style: none !important;
  max-width: 1300px !important;
  position: relative !important;
}

/* ریست li.product فقط داخل گرید خودمان */
.az-shop ul.products.az-grid > li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  position: static !important;
  clear: none !important;
}

/* حذف clearfix پیش‌فرض ووکامرس روی UL خودمان */
.az-shop ul.products.az-grid::before,
.az-shop ul.products.az-grid::after {
  content: none !important;
  display: none !important;
}

/* ===== کارت سفارشی پیشرفته ===== */
.az-card {
  list-style: none !important;
  background: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 24px !important;
  box-shadow: 
    0 4px 20px rgba(2, 6, 23, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  padding: 18px 18px 16px !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative !important;
  overflow: hidden !important;
  backdrop-filter: blur(10px) !important;
}

.az-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255, 41, 88, 0.3), transparent) !important;
  z-index: 1 !important;
}

.az-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 
    0 25px 50px rgba(255, 41, 88, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset !important;
  border-color: rgba(255, 41, 88, 0.1) !important;
}

/* تصویر با افکت شیشه‌ای */
.az-thumb {
  position: relative !important;
  display: block !important;
  aspect-ratio: 1/1.05 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #f9fafb, #f1f5f9) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.4s ease !important;
}

.az-card:hover .az-thumb {
  box-shadow: 0 8px 24px rgba(255, 41, 88, 0.15) !important;
  transform: scale(0.98) !important;
}

.az-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  padding: 8px !important;
}

.az-card:hover .az-thumb img {
  transform: scale(1.08) !important;
}

/* بج تخفیف مدرن */
.az-badge {
  position: absolute !important;
  top: 12px !important;
  inset-inline-start: 12px !important;
  background: linear-gradient(135deg, #ff2958, #ff6b9d) !important;
  color: #fff !important;
  font: 900 13px/1 Vazir, system-ui !important;
  padding: 0.5rem 0.8rem !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(255, 41, 88, 0.25) !important;
  z-index: 2 !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.az-card:hover .az-badge {
  transform: scale(1.1) rotate(5deg) !important;
  box-shadow: 0 8px 20px rgba(255, 41, 88, 0.35) !important;
}

/* دکمه علاقه‌مندی پیشرفته */
.az-wish {
  position: absolute !important;
  top: 12px !important;
  inset-inline-end: 12px !important;
  width: 40px !important;
  height: 40px !important;
  border: 1px solid rgba(255, 209, 220, 0.8) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  color: #ff2958 !important;
  box-shadow: 0 6px 16px rgba(255, 41, 88, 0.12) !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 2 !important;
}

.az-wish:hover {
  background: #ff2958 !important;
  color: #fff !important;
  border-color: #ff2958 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 8px 20px rgba(255, 41, 88, 0.3) !important;
}

.az-wish.is-on {
  background: #ff2958 !important;
  color: #fff !important;
  border-color: #ff2958 !important;
  animation: pulse 0.5s ease !important;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* عنوان محصول */
.az-title {
  margin: 16px 6px 10px !important;
  font: 800 15px/1.7 Vazir, system-ui !important;
  text-align: center !important;
  min-height: 51px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.az-title a {
  color: #0f172a !important;
  text-decoration: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  transition: color 0.2s ease !important;
}

.az-title a:hover {
  color: #ff2958 !important;
}

/* بخش متا (قیمت و امتیاز) */
.az-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 8px 0 !important;
  min-height: 32px !important;
}

/* استایل‌های قیمت پیشرفته */
.az-price {
  direction: rtl !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.az-price del {
  color: #9ca3af !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

.az-price ins {
  text-decoration: none !important;
  color: #111827 !important;
  font-weight: 900 !important;
  font-size: 18px !important;
  background: linear-gradient(90deg, #ff2958, #ff6b9d) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* اعداد قیمت LTR */
.az-price bdi {
  direction:ltr !important;
  unicode-bidi: plaintext !important;
  white-space: nowrap !important;
  display:inline-block !important;
  line-height:1.2 !important;
}

/* امتیاز ستاره‌ای */
.star-rating {
  transform: scale(0.95) !important;
  margin: 0 !important;
}

/* دکمه افزودن به سبد خرید پیشرفته */
.az-actions {
  display: flex !important;
  justify-content: center !important;
  margin-top: 12px !important;
  position: relative !important;
}

.az-add {
  background: linear-gradient(135deg, #ff2958, #ff6b9d) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 16px !important;
  padding: 0.85rem 1.4rem !important;
  font: 900 14px/1 Vazir, system-ui !important;
  box-shadow: 0 10px 24px rgba(255, 41, 88, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 140px !important;
  justify-content: center !important;
}

.az-add::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  transition: left 0.6s ease !important;
}

.az-add:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 15px 30px rgba(255, 41, 88, 0.35) !important;
}

.az-add:hover::before {
  left: 100% !important;
}

.az-add:active {
  transform: translateY(-1px) scale(1.02) !important;
}

.az-add.added::after {
  content: '✓' !important;
  font-weight: 900 !important;
  font-size: 16px !important;
}

/* ریسپانسیو گرید پیشرفته */
@media (max-width: 1200px) {
  .az-shop ul.products.az-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
}

@media (max-width: 900px) {
  .az-shop ul.products.az-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    padding: 0 16px !important;
  }
  
  .az-card {
    padding: 16px 14px 14px !important;
  }
}

@media (max-width: 600px) {
  .az-shop ul.products.az-grid {
    grid-template-columns: 1fr !important;
    max-width: 400px !important;
    margin: 20px auto 36px !important;
  }
  
  .az-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  
  .az-add {
    min-width: 120px !important;
    padding: 0.75rem 1.2rem !important;
  }
}

/* پنهان‌سازی بصری برای متن‌های دسترس‌پذیری */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* انیمیشن لود برای کارت‌ها */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.az-card {
  animation: fadeInUp 0.5s ease forwards;
}

/* ایجاد تاخیر برای انیمیشن کارت‌ها */
.az-shop ul.products.az-grid > li.product:nth-child(1) { animation-delay: 0.1s; }
.az-shop ul.products.az-grid > li.product:nth-child(2) { animation-delay: 0.2s; }
.az-shop ul.products.az-grid > li.product:nth-child(3) { animation-delay: 0.3s; }
.az-shop ul.products.az-grid > li.product:nth-child(4) { animation-delay: 0.4s; }
.az-shop ul.products.az-grid > li.product:nth-child(5) { animation-delay: 0.5s; }
.az-shop ul.products.az-grid > li.product:nth-child(6) { animation-delay: 0.6s; }

/* افکت‌های اضافی برای حالت‌های مختلف */
.az-card.outofstock {
  opacity: 0.7 !important;
  filter: grayscale(0.3) !important;
}

.az-card.outofstock .az-add {
  background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
  box-shadow: 0 10px 24px rgba(107, 114, 128, 0.25) !important;
  pointer-events: none !important;
}

.az-card.featured::after {
  content: 'پیشنهاد ویژه' !important;
  position: absolute !important;
  top: -8px !important;
  right: 50% !important;
  transform: translateX(50%) !important;
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  color: #fff !important;
  font: 900 11px/1 Vazir, system-ui !important;
  padding: 4px 12px !important;
  border-radius: 0 0 8px 8px !important;
  z-index: 3 !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}


