/* Product cards: store page and homepage (includes/product-card.php) */
.store-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.store-product {
  display: flex;
  flex-direction: column;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.store-product:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(111, 51, 175, 0.12);
}

.store-product-img {
  display: block;
  padding: 12px;
  border-bottom: 1px solid #ececec;
  background: #fff;
}

.store-product-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.store-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.store-product-tags {
  color: #777;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.store-product-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-product-name a {
  color: #111;
  text-decoration: none;
}

.store-product-name a:hover {
  color: var(--primary-color);
}

.store-product-detail {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-product-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #444;
}

.store-product-specs li + li {
  margin-top: 2px;
}

.store-product-specs span {
  color: #777;
  font-weight: 700;
}

.store-product-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.store-product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.store-product-now {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.store-product-was {
  color: #888;
  font-size: 14px;
}

.store-product-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 4px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease;
}

.store-product-btn:hover,
.store-product-btn:focus {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  .store-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .store-product-body {
    padding: 10px;
  }

  .store-product-name {
    font-size: 14px;
  }

  .store-product-detail {
    display: none;
  }

  .store-product-now {
    font-size: 17px;
  }

  .store-product-btn {
    width: 100%;
    text-align: center;
  }
}

/* Homepage latest products: one row of 4 */
.latest-products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media screen and (max-width: 1000px) {
  .latest-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
