/* گرید محصولات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 20px;
  margin-top: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* کارت محصول - بدون سایه یا قاب */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transition: none;
  width: 100%;
  box-sizing: border-box;
}

.product-card:hover {
  box-shadow: none;
  transform: none;
  transition: none;
}

/* تصویر محصول */
.product-card__image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.product-card__image img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

.product-card__img-main {
  position: relative;
  z-index: 1;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card__img-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1.03);
}

.product-card__image.has-hover-image:hover .product-card__img-hover {
  opacity: 1;
  transform: scale(1);
}

.product-card__image.has-hover-image:hover .product-card__img-main {
  opacity: 0;
}

/* نشان بچگانه روی کارت محصول */
.kids-badge-card-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card__image:hover .kids-badge-card-overlay {
  transform: scale(1.15) rotate(8deg);
}

.kids-badge-card-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* بدنه کارت */
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  padding-top: 10px;
  text-align: right;
  background: transparent;
}

/* عنوان محصول */
.product-card__title {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 3px;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* کد محصول */
.product-card__code {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: #71717a;
  margin: 0 0 5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.product-card__code-val {
  font-family: var(--font-en);
  font-weight: 600;
  color: #3f3f46;
  letter-spacing: 0.3px;
  direction: ltr;
}

/* قیمت محصول */
.product-card__price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.product-card__price-compare {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

.product-card__price-current {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

/* رنگ محصول (نام رنگ مثل Rose Gold) */
.product-card__color-name {
  font-family: var(--font-base);
  font-size: 12.5px;
  color: #777;
  margin-top: 2px;
  margin-bottom: 6px;
}

/* دایره‌های رنگ */
.product-card__colors {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 6px;
  flex-wrap: nowrap;
  padding: 4px 2px;
  overflow: hidden;
}

.product-card__more-swatches {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  flex-shrink: 0;
}

/* دکمه تست آنلاین */
.product-card__tryon {
  padding: 5px 14px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  border-radius: 24px;
  transition: all 0.2s ease;
}

.product-card__tryon:hover {
  border-color: #000;
  background: #fff;
  color: #000;
}

/* پایه دایره سواچ رنگ */
.product-card__swatch-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #eee;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.product-card__swatch-dot:hover {
  transform: scale(1.12);
}

/* حلقه‌ی انتخابی فعال (Selected/Active State) */
.product-card__swatch-dot.is-active,
.product-card__swatch-dot[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111111 !important;
  outline: none !important;
  transform: scale(1.05);
}

/* اگر رنگ شفاف داری */
.product-card__swatch-dot.is-transparent {
  background-image:
    linear-gradient(45deg,#ccc 25%,transparent 25%),
    linear-gradient(-45deg,#ccc 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#ccc 75%),
    linear-gradient(-45deg,transparent 75%,#ccc 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

/* مات: یک لایه‌ی نرم + کمی کاهش کنتراست */
.product-card__swatch-dot.is-matte {
  filter: contrast(0.9) brightness(0.95);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
}
.product-card__swatch-dot.is-matte::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.28);
  mix-blend-mode: soft-light;
  opacity: .55;
  pointer-events: none;
}

/* براق: highlight مورب + کمی درخشش */
.product-card__swatch-dot.is-glossy::after {
  content: "";
  position: absolute;
  inset: 2px 3px auto 3px;
  height: 40%;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.75),
    rgba(255,255,255,0.1)
  );
  opacity: 0.85;
  pointer-events: none;
}

/* کارت محصول تمام شده (Out of stock) */
.product-card.is-out-of-stock {
  opacity: 0.65;
  filter: grayscale(85%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.product-card.is-out-of-stock:hover {
  opacity: 0.85;
  filter: grayscale(40%);
}

.out-of-stock-badge-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(40, 40, 40, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 6;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* سواچ رنگ‌های تمام شده */
.product-card__swatch-dot.is-out-of-stock {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-card__swatch-dot.is-out-of-stock::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 1.5px;
  background-color: #d9534f;
  transform: translateY(-50%) rotate(-45deg);
  z-index: 10;
  pointer-events: none;
}

/* نشان و تایمر تخفیف ساعتی روی کارت محصول */
.hourly-deal-badge-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.hourly-deal-badge-overlay i {
  color: #fbbf24;
  font-size: 12px;
}

.product-card__hourly-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffe4e6;
  color: #be123c;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  direction: ltr;
}

.product-card__hourly-timer i {
  color: #e11d48;
}

/* نواراطلاع‌رسانی نتایج جستجو */
.search-results-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #334155;
}

.search-results-notice__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-results-notice__info i {
  color: #3b82f6;
  font-size: 16px;
}

.search-results-notice__clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-results-notice__clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
    margin-top: 16px;
  }
  .product-card__title {
    font-size: 13.5px;
  }
  .product-card__code {
    font-size: 10.5px;
    margin-bottom: 4px;
  }
  .product-card__price-current {
    font-size: 14.5px;
  }
  .product-card__price-compare {
    font-size: 11px;
  }
  .product-card__tryon {
    font-size: 11.5px;
    padding: 4px 10px;
  }
  .product-card__color-name {
    font-size: 11.5px;
    margin-bottom: 4px;
  }
  .product-card__colors {
    gap: 4px;
    margin-bottom: 6px;
  }
  .product-card__swatch-dot {
    width: 17px;
    height: 17px;
  }

}

/* Rating stars in product card */
.product-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #1e293b;
}

.product-card__stars {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #0f172a;
}

.product-card__stars i {
  font-size: 12px;
}

.product-card__rating-score {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.product-card__review-count {
  color: #64748b;
  font-size: 12px;
}

