.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--jaroni-white);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-4);
  box-shadow: var(--shadow-product);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 166, 81, .34);
  box-shadow: var(--shadow-product-hover);
}

.product-card:has(.product-card__overlay:focus-visible) {
  outline: 3px solid rgba(0, 166, 81, 0.35);
  outline-offset: 3px;
}

.product-card__overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
}

.product-card__overlay:focus-visible {
  outline: none;
}

.product-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-height: 210px;
  padding: var(--space-12);
  overflow: hidden;
  background: var(--jaroni-white);
  border: 0;
}

.product-card__media::after {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--jaroni-green) 0 48%, var(--jaroni-yellow) 48% 76%, var(--jaroni-red) 76% 100%);
  content: "";
}

.product-card__image-area {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
}

.product-card__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 220ms ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.025);
}

.product-card__image[hidden],
.product-card__placeholder[hidden],
.product-card__discount[hidden],
.product-card__regular-price[hidden],
.product-card__cart[hidden] {
  display: none;
}

.product-card__placeholder {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  color: #9aa4ae;
  font-size: var(--text-76);
  font-weight: var(--font-extrabold);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  border: 1px dashed #e0e5e2;
  border-radius: var(--radius-2);
}

.product-card__discount {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: var(--space-5) var(--space-8);
  color: #06713b;
  font-size: var(--text-75);
  font-weight: var(--font-extrabold);
  background: #e5f8ee;
  border: 1px solid rgba(0, 141, 69, .14);
  border-radius: var(--radius-3);
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-15) var(--space-14) var(--space-14);
}

.product-card__brand {
  margin: 0;
  color: #617069;
  font-size: 0.71rem;
  font-weight: var(--font-weight-750);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.product-card__title {
  margin: 0;
}

.product-card__title span {
  display: -webkit-box;
  min-height: 4.08em;
  margin: 0;
  overflow: hidden;
  color: #17221c;
  font-size: var(--text-92);
  font-weight: var(--font-weight-760);
  letter-spacing: -.012em;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6) var(--space-10);
  color: #7e8983;
  font-size: var(--text-xs);
}

.product-card__stock {
  color: var(--color-green-readable);
  font-weight: var(--font-weight-750);
}

.product-card__stock[data-stock-status="low"] {
  color: #a36200;
}

.product-card__stock[data-stock-status="out"] {
  color: #b42318;
}

.product-card__pricing {
  display: flex;
  min-height: 43px;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: auto;
}

.product-card__regular-price {
  margin: 0 0 1px;
  color: #929c97;
  font-size: var(--text-sm);
  text-decoration: line-through;
}

.product-card__price {
  margin: 0;
  color: #111916;
  font-size: var(--text-product-price);
  font-weight: var(--font-weight-820);
  letter-spacing: -.025em;
  line-height: 1.1;
}

.product-card__cart {
  position: relative;
  z-index: 4;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-14);
  color: #111916;
  border: 0;
  border-radius: var(--radius-4);
  background: var(--jaroni-yellow);
  font-size: var(--text-75);
  font-weight: var(--font-extrabold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: filter var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.product-card__cart:hover { filter: brightness(.97); transform: translateY(-1px); }
.product-card__cart:focus-visible { outline: 3px solid rgba(0, 166, 81, .35); outline-offset: 2px; }
.product-card__cart[aria-disabled="true"] { color: #7e8983; background: #e8ecea; cursor: not-allowed; pointer-events: none; }

.product-card__view {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-9);
  margin-top: var(--space-3);
  padding-top: var(--space-10);
  color: #08733e;
  font-size: .73rem;
  font-weight: var(--font-extrabold);
  letter-spacing: .025em;
  border-top: 1px solid #edf0ee;
  text-transform: uppercase;
}

.product-card:hover .product-card__view {
  color: var(--jaroni-green);
}

.product-card__view svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cart-toast {
  position: fixed;
  z-index: var(--z-1200);
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px var(--space-17);
  color: var(--jaroni-white);
  font-size: 0.87rem;
  font-weight: var(--font-weight-750);
  background: #132235;
  border-left: 4px solid #ffc400;
  border-radius: var(--radius-9);
  box-shadow: 0 15px 36px rgba(4, 15, 28, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 560px) {
  .product-card__media {
    min-height: 240px;
  }

  .cart-toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card__image,
  .product-card__cart,
  .cart-toast {
    transition: none;
  }
}
