/* ============================================================
   Ethical Clothing — Product card + grid
   (reused on home, PLP, PDP-related, material)
   ============================================================ */

/* -------------------- grid -------------------- */
.plp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
}
@media (max-width: 1100px) { .plp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .plp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-3); } }

/* -------------------- card -------------------- */
.product-card {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-alt) center/cover;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  cursor: pointer;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The shop's domain, on the brand line under the photo (it used to sit
   on the photo and covered models' faces). Outside the product link, so
   it's positioned onto line 1; the brand is shortened with an ellipsis
   to make room. Hidden when the card is 220px or narrower (phones). */
.product-head { position: relative; container-type: inline-size; }
.product-outbound-inline {
  position: absolute;
  top: 5px; right: 0; /* level with the brand, which sits at the foot of a 15px-text line */
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.product-outbound-inline svg { display: inline-block; vertical-align: -1px; margin-right: 3px; }
@container (max-width: 220px) { .product-outbound-inline { display: none; } }
@container (min-width: 221px) {
  .product-head:has(.product-outbound-inline) .product-brand {
    display: inline-block;
    max-width: calc(55% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
}

/* Brand on line 1 (mono, uppercase, muted); product name on line 2.
   The middot sits inline after the brand as a hard token boundary
   for NLP extraction — it stays visible but subordinate; .product-name
   is display:block so short names never share a line with the brand. */
.product-line {
  display: block;
  margin-bottom: var(--space-3);
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
}
.product-line:hover .product-name { text-decoration: underline; text-underline-offset: 3px; }
.product-line:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.product-brand {
  display: inline;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.product-sep {
  display: inline;
  color: var(--ink-3);
  font-size: 12px;
  margin-left: 2px;
}
.product-name {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink);
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
}
.product-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.product-price s {
  color: var(--ink-3);
  font-weight: 400;
  margin-right: 4px;
}
.product-price .discount {
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: 4px;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  text-transform: uppercase;
}
