/* ==========================================================================
   AGORA STOREFRONT - PRODUCT CARDS & GRID STYLES
   2-col mobile, 3-col tablet, 4-col desktop, swatches, hover swap, accent prices
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
}

@media (min-width: 640px) {
  .product-grid {
    gap: 24px 16px;
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 20px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 36px 24px;
  }
}

/* Single Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: transparent;
  transition: transform var(--transition-normal);
}

.product-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.4;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth), opacity 0.3s ease;
}

.product-card-img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth), transform 0.6s var(--ease-smooth);
  pointer-events: none;
}

@media (hover: hover) {
  .product-card:hover .product-card-img-hover {
    opacity: 1;
    transform: scale(1.04);
  }
  .product-card:hover .product-card-img:not(.product-card-img-hover) {
    transform: scale(1.04);
  }
}

/* Badges on Top Left of Product Card */
.product-badge-group {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}

.product-tag-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-line);
}

/* Swatches Preview on Card */
.product-card-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.swatch-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.swatch-btn::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--text-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.swatch-btn.is-active::after,
.swatch-btn:hover::after {
  opacity: 1;
}

.swatch-btn.is-active {
  transform: scale(1.08);
}

/* Product Info */
.product-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .product-card-title {
    font-size: 15px;
  }
}

.product-card-title:hover {
  color: var(--color-accent);
}

.product-card-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

/* Bold Accent Colour Sale Price (Reserved Crimson Red) */
.price-sale {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .price-sale {
    font-size: 16px;
  }
}

/* Struck Grey Old Price (11–12px strictly) */
.price-original {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Quick Add Button on Hover (Desktop) */
.product-card-quick-add {
  display: none;
}

@media (min-width: 1024px) {
  .product-card-quick-add {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--transition-normal);
    z-index: 3;
  }

  .product-card:hover .product-card-quick-add {
    opacity: 1;
    transform: translateY(0);
  }
}
