/* ========== Root Variables (Mobile-first) ========== */
:root {
  --card-gap: 8px;
  --border-color: #e0e0e0;
  --font-main: 'Segoe UI', sans-serif;
}

/* ========== Product Card Grid Layout ========== */
.product-card-grid,
.product-listing-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobile: 2 per row */
  gap: var(--card-gap);
  padding: 8px;
  justify-content: center;
  align-items: flex-start;
}

/* ========== Product Card ========== */
.product-card {
  background: #fff;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-main);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}
.product-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ========== Image Container ========== */
.product-card-image-container {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========== Wishlist Button (No Background) ========== */
.product-card .wishlist-button,
.product-card .wishlist-icon,
.product-card .wishlist-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent !important;
  box-shadow: none !important;
  border: none;
  padding: 0;
  width: auto;
  height: auto;
  font-size: 16px;
  color: #444;
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .wishlist-button svg {
  width: 20px;
  height: 20px;
  fill: #444;
}

/* ========== Product Info ========== */
.product-card-info {
  padding: 6px 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card-info .product-title {
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-info .product-price {
  font-weight: bold;
  font-size: 14px;
  color: #2e7d32;
}

.product-card-info .product-discount {
  font-size: 12px;
  color: #ff5722;
  margin-left: 6px;
}

.product-card-info .product-rating {
  font-size: 12px;
  color: #777;
}

/* ========== Tablet View (≥600px) ========== */
@media (min-width: 600px) {
  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .product-card-info {
    font-size: 14px;
  }
}

/* ========== Desktop View (≥768px) ========== */
@media (min-width: 768px) {
  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 12px;
  }

  .product-card-info {
    font-size: 15px;
  }

  .product-card .wishlist-button {
    font-size: 18px;
  }
}
