/*
 * ============================================================
 *  PRODUCT CARD - Single Source of Truth
 *  این فایل تنها منبع استایل کارت محصول است.
 *  هر تغییر اینجا → همه صفحات (شاپ، آرشیو، محصول مشابه، بلاک) به‌روز می‌شن.
 *  فایل‌های shop.css / product-archive.css / single-product.css
 *  نباید هیچ .product-card استایلی داشته باشن.
 * ============================================================
 */

/* -------------------------------------------------------
   Card container
------------------------------------------------------- */
.product-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(14, 29, 55, 0.1);
}

/* -------------------------------------------------------
   Image
------------------------------------------------------- */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.product-card:hover .product-card-image {
  transform: scale(1.05);
}

.product-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-family: "PeydaFaNumWeb", sans-serif !important;
  font-size: 13px;
}

/* -------------------------------------------------------
   Badges (Sale / Out of Stock)
------------------------------------------------------- */
.product-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: "PeydaFaNumWeb", sans-serif !important;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  line-height: 1.6;
}

.product-card-badge-sale {
  background: #d4af37;
  color: #1a1a1a;
}

.product-card-badge-out-of-stock {
  background: rgba(200, 0, 0, 0.85);
  color: #ffffff;
}

/* -------------------------------------------------------
   Content block
------------------------------------------------------- */
.product-card-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* -------------------------------------------------------
   Rating stars
------------------------------------------------------- */
.product-card-rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  color: #fbbf24;
}

.product-card-star {
  flex-shrink: 0;
}

/* -------------------------------------------------------
   Title
------------------------------------------------------- */
.product-card-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-title {
  font-family: "PeydaFaNumWeb", sans-serif !important;
  font-size: 15px;
  font-weight: 500;
  color: #1a2740;
  margin: 0;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -------------------------------------------------------
   Price
------------------------------------------------------- */
.product-card-price {
  margin: 0;
  width: 100%;
  text-align: right;
  margin-top: auto;
}

.product-card-price .price-html,
.product-card-price .price-html .woocommerce-Price-amount {
  font-family: "PeydaFaNumWeb", sans-serif !important;
  font-size: 15px;
  font-weight: 700;
  color: #1e2d48;
  line-height: 1.4;
}

.product-card-price .price-html del,
.product-card-price .price-html del .woocommerce-Price-amount {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
}

.product-card-price .price-html ins {
  text-decoration: none;
}

.product-card-price .price-html ins,
.product-card-price .price-html ins .woocommerce-Price-amount {
  text-decoration: none;
  color: #8a0020;
  font-weight: 700;
}

/* -------------------------------------------------------
   Action buttons
------------------------------------------------------- */
.product-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  gap: 10px;
  width: 100%;
}

.product-card-add-to-cart,
.product-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.25s ease;
  cursor: pointer;
}

.product-card-add-to-cart {
  background: #b54962;
  border: none;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(181, 73, 98, 0.3);
}

.product-card-add-to-cart:hover:not(:disabled) {
  background: #8a0020;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(138, 0, 32, 0.4);
}

.product-card-add-to-cart:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-card-qty-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  height: 42px;
}

.product-card-qty-btn {
  width: 36px;
  height: 42px;
  border: 0;
  border-inline-start: 1px solid #e6edf7;
  background: transparent;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-card-qty-controls .product-card-qty-btn:last-child {
  border-inline-start: 0;
}

.product-card-qty-controls .product-card-qty-btn:first-child {
  border-inline-start: 1px solid #e6edf7;
}

.product-card-qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-card-qty-value {
  min-width: 28px;
  text-align: center;
  font-family: "PeydaFaNumWeb", sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #1e2d48;
  line-height: 1;
}

.product-card-button {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #e2e8f0;
  color: #333333;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.product-card-button:hover {
  border-color: #b54962;
  color: #b54962;
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(181, 73, 98, 0.2);
}

.product-card-button-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.product-card-button:hover .product-card-button-icon {
  transform: rotate(45deg);
}
