/**
 * Product List Styles
 *
 * Product card grid for catalog items.
 * Extends category-grid card pattern with product-specific elements.
 *
 * @since 2.0
 */

/* ── Grid layout ── */
.product-list__row {
  display: flex;
  flex-wrap: wrap;
}

.product-list__row > [class*="col-"] {
  display: flex;
  margin-bottom: 30px;
}

.product-list__empty {
  padding: 60px 20px;
  font-size: 16px;
}

/* ── Product card ── */
.product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ── Image ── */
.product-card__image-link {
  display: block;
  text-decoration: none;
}

.product-card__image-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 100%;  /* 1:1 square for products */
  overflow: hidden;
  background: #f8f8f8;
}

.product-card__image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;  /* contain, not cover — show full product */
  padding: 10px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.05);
}

/* ── Body ── */
.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.product-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 5px 0;
  line-height: 1.3;
}

.product-card__title a {
  color: inherit;
  text-decoration: none;
}

.product-card__title a:hover,
.product-card__title a:focus-visible {
  color: var(--brand-primary-color, #337ab7);
}

.product-card__title a:focus-visible {
  outline: 2px solid var(--brand-primary-color, #337ab7);
  outline-offset: 2px;
}

.product-card__image-link:focus-visible {
  outline: 2px solid var(--brand-primary-color, #337ab7);
  outline-offset: 2px;
}

.product-card__image-link:focus-visible .product-card__image-wrap img {
  transform: scale(1.05);
}

.product-card__sku {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.product-card__desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
  flex: 1;
}

/* ── Action buttons ── */
.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.product-card__actions .btn {
  font-size: 12px;
  padding: 5px 10px;
}

.product-card__btn-inquiry {
  flex: 1;
}

.product-card__btn-cart {
  flex: 1;
  color: #fff;
  background-color: #267326;
  border-color: #1f5e20;
}

.product-card__btn-cart:hover,
.product-card__btn-cart:focus,
.product-card__btn-cart:active {
  color: #fff;
  background-color: #1f5e20;
  border-color: #194d1a;
}

.product-card__btn-cart .fa {
  margin-right: 4px;
}

.product-list__placeholder-card {
  min-height: 567px;
}

.product-list__placeholder-body {
  min-height: 297px;
}

.product-list__placeholder-image,
.product-list__placeholder-line {
  background: #eef1f5;
}

.product-list__placeholder-line {
  display: block;
  width: 100%;
  height: 14px;
  margin-bottom: 12px;
  border-radius: 3px;
}

.product-list__placeholder-line--title {
  width: 76%;
  height: 18px;
}

.product-list__placeholder-line--short {
  width: 55%;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .product-card__title {
    font-size: 14px;
  }
  .product-card__desc {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .product-list__row > [class*="col-"] {
    margin-bottom: 15px;
  }
  .product-card__image-wrap {
    padding-bottom: 75%;  /* 4:3 on mobile */
  }
  .product-card__actions {
    flex-direction: column;
  }
  .product-list__placeholder-card,
  .product-list__placeholder-body {
    min-height: 0;
  }
}
