/* ===================================================================
   PRODUCT CARD COMPONENT — LUXURY EDITION
   Aligned with REX CC Brand System
   =================================================================== */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 280px;
  flex-shrink: 0;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

/* ========================================
   IMAGE CONTAINER
   ======================================== */

.product-card__image-box {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #fafafa;
  overflow: hidden;
  margin-bottom: 20px;
  display: block;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ========================================
   DISCOUNT BADGE — LUXURY TONE
   ======================================== */

.product-card__discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #cd7f32 0%, #b06825 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 3px;
  z-index: 2;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(205, 127, 50, 0.35);
}

.product-card__stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 3px;
  z-index: 2;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(211, 47, 47, 0.25);
}

/* ========================================
   WISHLIST BUTTON
   ======================================== */

.product-card__wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #111;
  opacity: 0;
  transform: translateX(10px);
}

.product-card:hover .product-card__wishlist-btn {
  opacity: 1;
  transform: translateX(0);
}

.product-card__wishlist-btn:hover {
  background: #fff;
  color: #ff3b30;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(255, 59, 48, 0.2);
}

.product-card__wishlist-btn .material-icons {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Fix: Use .is-active to match JS */
.product-card__wishlist-btn.is-active {
  color: #ff3b30;
  background: #fff;
  box-shadow: 0 5px 15px rgba(255, 59, 48, 0.15);
}

.product-card__wishlist-btn.is-active .material-icons {
  font-family: "Material Icons";
  /* Ensure filled icon renders */
  content: "favorite";
  animation: wishlistHeartbeat 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes wishlistHeartbeat {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* ========================================
   OVERLAY CTA — EDITORIAL
   ======================================== */

.product-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card:hover .product-card__overlay {
  opacity: 1;
}

/* ========================================
   PRODUCT INFO
   ======================================== */

.product-card__info {
  text-align: center;
  padding: 0 8px;
}

.product-card__brand {
  display: block;
  font-size: 0.65rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 500;
}

.product-card__name {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: #111111;
  margin-bottom: 10px;
  line-height: 1.3;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

/* ===================================== 
   VARIANT MICRO-SPECS
   ======================================== */

.product-card__variant-info {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #777;
}

.variant-attr::after {
  content: "•";
  margin-left: 8px;
  color: #bbb;
}

.variant-attr:last-child::after {
  display: none;
}

/* ========================================
   PRICING
   ======================================== */

.product-card__pricing {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.product-card__price {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111111;
  font-family: "Montserrat", sans-serif;
}

.product-card__original-price {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
  font-weight: 400;
  font-family: "Montserrat", sans-serif;
}

/* ========================================
   GRID ENHANCEMENT
   ======================================== */

.product-grid .product-card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .product-card {
    min-width: 220px;
  }

  .product-card__name {
    font-size: 1rem;
    min-height: 2.4rem;
  }
}

/* ========================================
   CAROUSEL SUPPORT
   ======================================== */

.carousel-container .product-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}
