.product-card {
  position: relative;
  height: auto;
  min-width: 0;
  border: 1px solid var(--y-color-primary);
  background: var(--y-color-primary);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.product-card-info {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-card-title,
.product-card h3 {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-word;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.123);
}

.product-card a {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--y-font-family);
  width: 100%;
  text-align: center;
}
.product-card-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.product-card-price img {
  vertical-align: middle;
  height: 1em;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.product-card .product-card-img img {
  border-radius: 15px;
}
.product-card-fav {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.product-card-fav-input {
  display: none;
}

.product-card-fav-icon {
  font-size: 1.2rem;
  color: var(--y-color-neutral-200, #e0e0e0);
  transition: color 0.2s ease, transform 0.2s ease;
}

.product-card-fav:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.product-card-fav-input:checked + .product-card-fav-icon {
  color: #ff2d55;
  transform: scale(1.12);
}

@media (max-width: 820px) {
  .product-card {
    width: 100%;
    height: auto;
    min-height: unset;
    padding: 12px;
    gap: 8px;
    border-width: 1px;
    border-radius: 12px;
  }
  .product-card-fav {
    top: 14px;
    inset-inline-start: 14px;
  }
  .product-card h3 {
    font-size: 1.1rem;
  }
  .product-card a.btn-primary,
  .product-card a.add_to_cart_button {
    font-size: 0.8rem;
    white-space: nowrap;
    padding-inline: 0.5rem;
  }
  .product-card a {
    font-size: 1rem;
  }
  .product-card-price {
    font-size: 1.4rem;
  }
  .product-card .product-card-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
  }
}

@media (max-width: 480px) {
  .product-card {
    max-width: 100%;
    padding: 12px;
    gap: 8px;
    border-width: 1px;
    border-radius: 12px;
    min-height: unset;
  }

  .product-card-fav {
    top: 12px;
    inset-inline-start: 12px;
    width: 32px;
    height: 32px;
  }

  .product-card-fav-icon {
    font-size: 1rem;
  }

  .product-card .product-card-img {
    overflow: hidden;
    border-radius: 12px;
  }

  .product-card .product-card-img img {
    height: auto;
    min-height: 0;
    border-radius: 12px;
  }

  .product-card-price {
    font-size: 0.875rem;
  }

  .product-card-price del,
  .product-card-price del .woocommerce-Price-amount {
    font-size: 0.8em;
  }

  .product-card-price img {
    height: 1em;
  }

  .product-card h3 {
    font-size: 1rem;
  }

  .product-card a.btn-primary,
  .product-card a.add_to_cart_button {
    font-size: 0.75rem;
    white-space: nowrap;
    padding-inline: 0.35rem;
  }
  .product-card a {
    font-size: 0.9rem;
  }
}
