/* ======= Root Vars (Default: Mobile) ======= */
:root {
  --card-width: 190px;
  --card-height: 280px;
  --image-height: 280px;
  --border-color: #eee;
  --card-gap:0px;
}

/* ======= Grid Container ======= */
.product-card-grid,
.product-listing-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
  padding:0px;
  justify-items: center;
}

/* ======= Product Card ======= */
.product-card {
  background: #fff;
  width: var(--card-width);
  height: var(--card-height);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding:1px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* ======= Image Container ======= */
.product-card-image-container {
  width: 100%;
  height: var(--image-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ======= Product Image ======= */
.product-card-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* ======= Product Info ======= */
.product-card-info {
  padding-top: 4px;
  text-align: center;
  font-size: 12px;
  flex-grow: 1;
}

.product-card-info h3,
.product-card-info .product-title {
  font-size: 12px;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.product-card-info .price {
  font-size: 11px;
  color: #388e3c;
  font-weight: 600;
  margin-top: 2px;
}

/* ======= Wishlist Button ======= */
.product-card .wishlist-button,
.product-card .wishlist-icon,
.product-card .wishlist-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  background: white;
  border-radius: 50%;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
  z-index: 10;
  pointer-events: auto;
}

.product-card .wishlist-button:hover {
  transform: scale(1.1);
}

/* ======= Tablet (≥ 600px) ======= */
@media (min-width: 600px) {
  :root {
    --card-width: 190px;
    --card-height: 300px;
    --image-height: 180px;
    --card-gap: 10px;
  }

  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px;
  }

  .product-card-info {
    font-size: 13px;
  }

  .product-card-info h3 {
    font-size: 13px;
  }

  .product-card-info .price {
    font-size: 12px;
  }

  .product-card .wishlist-button {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

/* ======= Desktop (≥ 768px) ======= */
@media (min-width: 768px) {
  :root {
    --card-width: 260px;
    --card-height: 420px;
    --image-height: 410px;
    --card-gap: 10px;
  }

  .product-card-grid,
  .product-listing-container {
    grid-template-columns: repeat(4, 1fr);
    padding: 12px;
  }

  .product-card-info {
    font-size: 14px;
  }

  .product-card-info h3 {
    font-size: 14px;
  }

  .product-card-info .price {
    font-size: 13px;
  }

  .product-card .wishlist-button {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
