/* ==========================================================================
   Featured Products Section
   ========================================================================== */

/* ── Section ── */
.featured-products {
  padding-block: var(--space-4xl);
}

/* ── Product Grid: 4 columns ── */
.featured-products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

/* ── Product Card ── */
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-dark);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.product-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card__link:hover {
  color: inherit;
}

/* ── Card Image ── */
.product-card__image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-dark-mid);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.06);
}

/* ── Badge (Bestseller) ── */
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

/* ── Add to Cart Icon ── */
.product-card__add-to-cart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(7, 28, 36, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
}

.product-card__add-to-cart:hover {
  background: var(--color-primary);
}

.product-card__add-to-cart svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

/* In-cart state */
.product-card__add-to-cart.is-in-cart {
  background: var(--color-primary);
}

.product-card__add-to-cart.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ── Card Info ── */
.product-card__info {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.product-card__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  margin: 0 0 4px;
  line-height: var(--line-height-tight);
}

.product-card__desc {
  font-size: var(--font-size-xs);
  color: var(--color-neutral);
  margin: 0 0 var(--space-sm);
  line-height: var(--line-height-base);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Price ── */
.product-card__price {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.product-card__price del {
  color: var(--color-neutral);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-xs);
  margin-right: 6px;
}

.product-card__price ins {
  text-decoration: none;
}

/* ── Footer: View All ── */
.featured-products__footer {
  text-align: center;
}

.featured-products__view-all {
  border-radius: var(--radius-md);
  padding: 14px 32px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .featured-products__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .featured-products {
    padding-block: var(--space-2xl);
  }

  .featured-products__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}
