/* ==========================================================================
   Openn™ - products page (products.html)
   Same listing as work.html; each card links out to the product, with a
   one-line description underneath at the card's own width.
   ========================================================================== */

/* same box as a /work cover card: 50vh tall (max 34rem) at 16/10, never wider
   than the column. Sized here because the card holds no in-flow image. */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(100%, calc(min(50vh, 34rem) * 1.6));
}

.product-card .work__item {
  width: 100%;
  height: auto;
  max-height: none;
}

.product-card__desc {
  width: 0;
  min-width: 100%;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--grey-500);
}

/* ---------- cover: two rows of product screens, drifting opposite ways ---------- */
/* the rows sit absolutely so their long tracks can't widen the card:
   it keeps the same 16/10 size as the Maxiwise card on /work */
.pm__rows {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
}

.pm__row {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* two identical halves; each image carries its own right margin so -50% lands exactly */
.pm__track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: pm-drift 60s linear infinite;
}

.pm__row--rev .pm__track {
  animation-direction: reverse;
}

.pm__track img {
  height: 100%;
  width: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 0.75rem;
  margin-right: 1rem;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-md);
  background-color: var(--paper);
}

.work__item:hover .pm__track {
  animation-play-state: paused;
}

@keyframes pm-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .pm__track { animation: none; }
}

@media (max-width: 767px) {
  .pm__rows { gap: 0.5rem; padding: 0.75rem 0; }
  .pm__track img { margin-right: 0.5rem; padding: 0.375rem; border-radius: var(--radius-sm); }
}

/* white cover on the paper ground needs its edge drawn */
.product-card .work__item {
  border: 1px solid var(--grey-100);
}
