/* ===== Product card (dense / Digikala-like) ===== */
.product-card-pro {
  --pc-radius: 0.85rem;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: var(--pc-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.product-card-pro:hover {
  border-color: #d0d7e2;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.product-card-pro__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
  overflow: hidden;
}

.product-card-pro__media a {
  display: block;
  height: 100%;
}

.product-card-pro__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem;
  transition: transform 0.35s ease;
}

.product-card-pro:hover .product-card-pro__media img {
  transform: scale(1.06);
}

.product-card-pro__badges {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
  z-index: 2;
}

.product-card-pro__badge {
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 0.45rem;
  padding: 0.18rem 0.45rem;
  line-height: 1.2;
}

.product-card-pro__badge--sale {
  background: #ef4444;
  color: #fff;
}

.product-card-pro__badge--out {
  background: #64748b;
  color: #fff;
}

.product-card-pro__badge--ship {
  background: #ecfdf5;
  color: #047857;
}

.product-card-pro__wish {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #64748b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-card-pro__wish.active,
.product-card-pro__wish:hover {
  color: #dc3545;
}

.product-card-pro__quick {
  position: absolute;
  inset-inline: 0.55rem;
  bottom: 0.55rem;
  display: flex;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.product-card-pro:hover .product-card-pro__quick {
  opacity: 1;
  transform: translateY(0);
}

.product-card-pro__quick-btn {
  flex: 1;
  border: 0;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
}

.product-card-pro__quick-btn--cart {
  background: #0d6efd;
}

.product-card-pro__quick-btn:hover {
  color: #fff;
  filter: brightness(1.08);
}

.product-card-pro__quick-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.product-card-pro__body {
  padding: 0.7rem 0.75rem 0.85rem;
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
}

.product-card-pro__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.product-card-pro__category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-pro__category:hover {
  color: #0d6efd;
}

.product-card-pro__stock {
  font-size: 0.65rem;
  font-weight: 800;
  color: #059669;
  white-space: nowrap;
}

.product-card-pro__stock.is-low {
  color: #d97706;
}

.product-card-pro__stock.is-out {
  color: #dc2626;
}

.product-card-pro__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 0.4rem;
  min-height: 2.55em;
}

.product-card-pro__title a {
  color: #1e293b;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-pro__title a:hover {
  color: #0d6efd;
}

.product-card-pro__rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.product-card-pro__rating i {
  font-size: 0.72rem;
}

.product-card-pro__rating-score {
  font-weight: 800;
  color: #475569;
  margin-right: 0.15rem;
}

.product-card-pro__price-block {
  margin-top: auto;
}

.product-card-pro__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
}

.product-card-pro__price del {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.product-card-pro__save {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
}

.product-card-pro__footer {
  padding: 0.45rem 0.75rem 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.product-card-pro__btn {
  width: 100%;
  border-radius: 0.55rem;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.45rem 0.5rem;
}

.product-card-pro__icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.product-card-pro__icon-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
}

/* Dense product grids */
.product-grid-dense {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.home-section {
  padding: 1.5rem 0;
}

.home-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.home-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
}

.home-section__sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.home-section__link {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0d6efd;
  text-decoration: none;
  white-space: nowrap;
}

.home-section__link:hover {
  color: #0b5ed7;
}

.home-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.home-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.home-cat-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.home-cat-chip__count {
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
}

.home-promo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0.25rem;
}

.home-promo {
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e8edf3;
  background: #fff;
  min-height: 88px;
}

.home-promo h4 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 900;
  color: #0f172a;
}

.home-promo p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
}

.home-promo--blue { background: linear-gradient(135deg, #eff6ff, #fff); }
.home-promo--green { background: linear-gradient(135deg, #ecfdf5, #fff); }
.home-promo--amber { background: linear-gradient(135deg, #fff7ed, #fff); }
.home-promo--rose { background: linear-gradient(135deg, #fff1f2, #fff); }

.home-category-block {
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 1rem;
  padding: 0.9rem;
}

@media (max-width: 1199.98px) {
  .product-grid-dense {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-promo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .product-grid-dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .product-grid-dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .product-card-pro__quick {
    opacity: 1;
    transform: none;
  }

  .product-card-pro__title {
    font-size: 0.76rem;
    min-height: 2.4em;
  }

  .product-card-pro__footer {
    grid-template-columns: 1fr;
  }

  .product-card-pro__icon-btn {
    display: none;
  }

  .home-promo-strip {
    grid-template-columns: 1fr 1fr;
  }

  .home-section__title {
    font-size: 1rem;
  }
}
