/* NotenHaus — product card (portrait cover + diagonal badge) */

.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  /* visible: cart-toast under the button must not be clipped (overflow-x:hidden forces overflow-y) */
  overflow: visible;
}

.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.product-card__link:hover,
.product-card__link:focus-visible {
  text-decoration: none;
  color: inherit;
  outline: none;
}

.product-card__media {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-muted);
  width: 50%;
  max-width: 10.5rem;
  aspect-ratio: 2 / 3;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.65rem;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.product-card__img,
.product-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.product-card__placeholder {
  background:
    linear-gradient(145deg, var(--jwp-color-neutral-1), var(--jwp-color-neutral-2));
}

.product-card__link:hover .product-card__img,
.product-card__link:focus-visible .product-card__img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0.75rem;
  max-width: calc(100% - 0.5rem);
  min-width: 0;
  padding: 0.28rem 0.55rem;
  transform: rotate(-32deg);
  transform-origin: left bottom;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--jwp-color-neutral-5);
  box-shadow: 0 1px 4px rgba(28, 28, 28, 0.18);
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .product-card__media {
    width: 48%;
    max-width: 11.5rem;
  }

  .product-card__badge {
    left: -0.35rem;
    bottom: 0.9rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.62rem;
  }
}

@media (min-width: 1024px) {
  .product-card__media {
    width: 46%;
    max-width: 12rem;
  }
}

.product-card__badge--yellow {
  background: var(--color-badge-yellow);
}

.product-card__badge--gold {
  background: var(--color-badge-gold);
}

.product-card__badge--maroon {
  background: var(--color-badge-maroon);
  color: var(--jwp-color-neutral-0);
}

.product-card__badge--blue {
  background: var(--color-badge-blue);
  color: var(--jwp-color-neutral-0);
}

.product-card__title {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

.product-card__link:hover .product-card__title,
.product-card__link:focus-visible .product-card__title {
  color: var(--color-brand);
}

.product-card__meta,
.product-card__code {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-weight: 400;
}

.product-card__price {
  margin-top: auto;
  padding-top: 0.55rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.product-card__instruments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.35rem 0 0;
}

.product-card__inst-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  background: var(--color-bg-sidebar);
  border: 1px solid var(--color-border);
  color: var(--jwp-color-dark-grey);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.product-card__btn {
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.product-card__btn--preview {
  flex: 0 0 auto;
}

.product-card__cart-form {
  flex: 1 1 auto;
  min-width: 0;
}

.product-card__cart-form .product-card__btn,
.product-card__cart-form > .btn {
  width: 100%;
}

.product-card__cart-form > form {
  display: block;
  width: 100%;
}

.product-card__oos {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
