/* Product card listing: {child-theme}/assets/css/product-listing.css */

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }

.woocommerce ul.products li.product {
  width: 100%;
  margin: 0;
  padding: 0;
  float: none;
}

.crk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  background: #fff;
  border: 1px solid #f1e3cf;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.crk-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(214, 40, 40, .18);
}

.crk-card img {
  margin-bottom: 15px;
}

.crk-card .onsale {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-height: auto;
  min-width: auto;
  padding: 4px 12px;
  line-height: 1.4;
  border-radius: 20px;
  background: #f77f00;
  color: #fff;
}

.crk-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 12px;
}

.crk-card__desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b6b6b;
  /* min-height: 40px; */
}

.crk-card__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  /* min-height: 42px; */
}
.crk-card__title a { color: #2b2b2b; text-decoration: none; }

.crk-card__price {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #d62828;
}
.crk-card__price del { color: #999; font-weight: 400; font-size: 14px; }
.crk-card__price ins { background: none; text-decoration: none; }

.crk-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.crk-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #f1e3cf;
  border-radius: 8px;
  background: #fff8ec;
}
.crk-qty__btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d62828;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.crk-qty__btn:hover { background: #ffe9c7; }
.crk-qty__input {
  width: 56px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}
.crk-qty__input::-webkit-outer-spin-button,
.crk-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.crk-card__actions .button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #d62828;
  color: #fff;
  font-weight: 600;
  text-align: center;
  transition: background .2s ease;
}
.crk-card__actions .button:hover { background: #f77f00; color: #fff; }
.crk-card__actions .added_to_cart {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #d62828;
}
/* Out of stock label (replaces "Read more") */
.crk-soldout {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f0e9e1;
  color: #8a7f74;
  font-weight: 600;
  cursor: not-allowed;
  user-select: none;
}

@media (max-width: 991px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .crk-card { padding: 10px; }
  .crk-card__title { font-size: 14px; }
  /* .crk-card__desc { display: none; } */
}