/* =========================================================================
   Product card grid
   Used by kolmeks/category-product-list block on taxonomy-product_cat
   ========================================================================= */

.kolmeks-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--wp--preset--spacing--30);
  margin: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--70) 0;
  padding: 0;
}

/* Card */
.kolmeks-product-card {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
  padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
  height: 100%;
  position: relative;
}

.kolmeks-product-card:hover {
  background-color: #f0f4f8;
  text-decoration: none;
}

/* Image area */
.kolmeks-product-card__image {
  width: 100%;
  height: 172px;
  object-fit: cover;
}

.kolmeks-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.kolmeks-product-card__image-placeholder {
  width: 100%;
  height: 100%;
}

/* Body */
.kolmeks-product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--10);
}

.kolmeks-product-card__title {
  font-size: var(--wp--preset--font-size--text-s);
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.kolmeks-product-card__description {
  font-size: var(--wp--preset--font-size--text-xs);
  font-weight: 400;
  margin: 0;
  line-height: 1.5;
}

.kolmeks-product-card__arrow-right-icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wp--preset--color--midnight-blue);
  border-radius: 100%;
  margin-left: auto;
  flex-shrink: 0;
}

.kolmeks-product-card__arrow-right-icon img {
  width: 12px;
  height: 12px;
  display: block;
  filter: brightness(0) invert(1);
}

/* Responsive: collapse to two columns on small screens */
@media (max-width: 480px) {
  .kolmeks-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
