/* ===========================================================
   STANIMAL — Product Card CSS v2
   Hairline grid, editorial card style. No border-radius.
   Editorial-Industrial 2026.
   =========================================================== */

/* ---------- Grid (hairline bordered surface) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Card ---------- */
.product-card {
  display: flex; flex-direction: column;
  cursor: pointer;
  position: relative;
  background: var(--bg);
  padding: var(--space-4) var(--space-4) var(--space-5);
}

/* For PHP templates that wrap cards in <a> */
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: var(--ink-900);
}

/* ---------- Media ---------- */
.product-card .media {
  aspect-ratio: 4 / 5;
  background: var(--ink-100);
  margin-bottom: var(--space-4);
  position: relative;
  overflow: hidden;
}
.product-card .media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.product-card:hover .media img { transform: scale(1.04); }

/* ---------- Badge tag ---------- */
.product-card .badge-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--ink-900); color: var(--bg);
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px;
}
.product-card .badge-tag.hot { background: var(--hot); }

/* ---------- Edition stamp ---------- */
.product-card .edition-stamp {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  text-transform: uppercase;
}

/* ---------- Wishlist heart ---------- */
.product-card .wishlist {
  position: absolute; bottom: 10px; right: 10px;
  width: 34px; height: 34px;
  background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .18s ease, color .18s ease;
  border: none; cursor: pointer;
}
.product-card:hover .wishlist { opacity: 1; }
.product-card .wishlist.active { opacity: 1; color: var(--hot); }
.product-card .wishlist:hover { color: var(--hot); }
.product-card .wishlist .icon { width: 16px; height: 16px; pointer-events: none; }

/* ---------- Quick-add bar ---------- */
.product-card .quick-add {
  position: absolute; bottom: 10px; left: 10px; right: 54px;
  background: var(--ink-900); color: var(--bg);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center;
  transform: translateY(8px); opacity: 0;
  transition: transform .2s ease, opacity .2s ease, background .15s ease;
  border: none; cursor: pointer;
}
.product-card:hover .quick-add { transform: translateY(0); opacity: 1; }
.product-card .quick-add:hover { background: var(--hot); }

/* ---------- Name row ---------- */
.product-card .name-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-3);
  margin-bottom: 4px;
}
.product-card .name-row h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 88;
  line-height: 1.05;
}
.product-card .price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* WooCommerce price overrides */
.product-card .price ins,
.product-card .price bdi { text-decoration: none; }

/* ---------- Meta row ---------- */
.product-card .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}
.product-card .meta small {
  color: var(--ink-500);
  font-size: 10px;
  flex: 1;
}
.product-card .meta .size-pill {
  border: 1px solid var(--line);
  padding: 2px 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid,
  .product-grid.cols-3,
  .product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .product-grid,
  .product-grid.cols-3,
  .product-grid.cols-4 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .product-card .quick-add { opacity: 1; transform: translateY(0); }
  .product-card .wishlist { opacity: 1; }
}
