.product-card {
  --product-card-media-inset: 0.9rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(71, 48, 38, 0.08);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  user-select: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(71, 48, 38, 0.12);
  box-shadow: 0 20px 36px rgba(69, 43, 34, 0.12);
}

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  background: #fdfdfc;
}

.product-card__media-link {
  display: block;
  width: calc(100% - (var(--product-card-media-inset) * 2));
  height: calc(100% - var(--product-card-media-inset));
  margin: var(--product-card-media-inset) var(--product-card-media-inset) 0;
  text-decoration: none;
}

.product-card__visual {
  width: 100%;
  height: 100%;
  border-radius: 16px 16px 0 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.product-card__image {
  width: 100%;
  height: 100%;
  border-radius: 16px 16px 0 0;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease, filter 220ms ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.01);
}

.product-card__favorite {
  position: absolute;
  top: calc(var(--space-4) + 2px);
  right: calc(var(--space-4) + 2px);
  z-index: 1;
  display: inline-grid;
  place-items: center;
  height: 32px;
  width: 32px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(71, 48, 38, 0.08);
  color: var(--brand-deep);
  box-shadow: 0 10px 18px rgba(35, 22, 20, 0.08);
  backdrop-filter: blur(12px);
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.product-card__favorite:hover {
  transform: translateY(-1px);
  background: rgba(255, 244, 247, 0.94);
  border-color: rgba(141, 47, 76, 0.16);
  color: #8d2f4c;
  box-shadow: 0 14px 22px rgba(35, 22, 20, 0.1);
}

.product-card__favorite.is-active {
  background: rgba(255, 238, 243, 0.96);
  border-color: rgba(180, 52, 88, 0.22);
  color: #b43458;
  box-shadow: 0 14px 24px rgba(180, 52, 88, 0.14);
}

.product-card__favorite.is-pending {
  cursor: wait;
  opacity: 0.72;
}

.product-card__favorite-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.product-card__favorite-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: transparent;
  stroke-width: 1.9;
  transition: fill 160ms ease, stroke 160ms ease, transform 160ms ease;
}

.product-card__favorite.is-active .product-card__favorite-icon svg {
  fill: currentColor;
  stroke: currentColor;
}

.product-card__body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.product-card__meta-rating {
  color: var(--brand-deep);
  font-weight: 700;
}

.product-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card__title-link {
  color: inherit;
  text-decoration: none;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-width: 0;
  padding: 0 var(--space-5) var(--space-5);
}

.product-card__price {
  display: grid;
  gap: 0.1rem;
  align-items: start;
  min-width: 0;
}

.product-card__price-current {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.1;
}

.product-card__price-old {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: line-through;
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 16px;
  background: rgba(61, 122, 103, 0.12);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.product-card:hover .product-card__cta {
  background: rgba(61, 122, 103, 0.18);
  transform: translateY(-1px);
}

.product-card--featured .product-card__media {
  aspect-ratio: 4 / 5;
}

.product-card--compact .product-card__body {
  gap: var(--space-2);
}

@media (max-width: 1099px) {
  .product-card {
    --product-card-media-inset: 0.8rem;
  }

  .product-card__body {
    padding: 1.1rem 1.1rem 0.95rem;
  }

  .product-card__footer {
    padding: 0 1.1rem 1.1rem;
  }

  .product-card__title {
    font-size: 1.02rem;
  }

  .product-card__meta {
    font-size: 0.82rem;
  }
}

@media (max-width: 819px) {
  .product-card {
    border-radius: 18px;
  }

  .product-card__visual,
  .product-card__image {
    border-radius: 14px 14px 0 0;
  }

  .product-card__favorite {
    top: calc(0.8rem + 2px);
    right: calc(0.8rem + 2px);
    width: 30px;
    height: 30px;
  }

  .product-card__body {
    gap: 0.7rem;
    padding: 1rem 1rem 0.9rem;
  }

  .product-card__footer {
    gap: 0.75rem;
    padding: 0 1rem 1rem;
  }

  .product-card__title {
    font-size: 0.98rem;
  }

  .product-card__meta {
    gap: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  .product-card__price-current {
    font-size: 1.05rem;
  }

  .product-card__price-old {
    font-size: 0.78rem;
  }

  .product-card__cta {
    min-height: 42px;
    padding: 0 0.95rem;
    border-radius: 14px;
  }
}

@media (max-width: 559px) {
  .product-card {
    border-radius: 15px;
    --product-card-media-inset: 0.65rem;
  }

  .product-card__visual,
  .product-card__image {
    border-radius: 12px 12px 0 0;
  }

  .product-card__favorite {
    top: 0.65rem;
    right: 0.65rem;
    width: 30px;
    height: 30px;
  }

  .product-card__favorite-icon {
    font-size: 0.96rem;
  }

  .product-card__body {
    gap: 0.55rem;
    padding: 0.78rem 0.78rem 0.72rem;
  }

  .product-card__footer {
    align-items: end;
    gap: 0.5rem;
    padding: 0 0.78rem 0.78rem;
  }

  .product-card__title {
    font-size: 0.84rem;
    line-height: 1.24;
    letter-spacing: -0.015em;
    min-height: calc(1.24em * 2);
  }

  .product-card__meta {
    flex-wrap: nowrap;
    gap: 0.2rem 0.32rem;
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-card__price-current {
    font-size: 0.88rem;
  }

  .product-card__price-old {
    font-size: 0.68rem;
  }

  .product-card__cta {
    min-height: 36px;
    padding: 0 0.72rem;
    border-radius: 12px;
    font-size: 0.78rem;
  }
}

@media (max-width: 359px) {
  .product-card {
    border-radius: 16px;
    --product-card-media-inset: 0.75rem;
  }

  .product-card__visual,
  .product-card__image {
    border-radius: 13px 13px 0 0;
  }

  .product-card__favorite {
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
  }

  .product-card__favorite-icon {
    font-size: 1rem;
  }

  .product-card__body {
    gap: 0.65rem;
    padding: 0.95rem 0.95rem 0.85rem;
  }

  .product-card__footer {
    gap: 0.75rem;
    padding: 0 0.95rem 0.95rem;
  }

  .product-card__title {
    font-size: 0.96rem;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
  }

  .product-card__meta {
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
    font-size: 0.76rem;
    white-space: normal;
  }

  .product-card__price-current {
    font-size: 1rem;
  }

  .product-card__price-old {
    font-size: 0.74rem;
  }

  .product-card__cta {
    min-height: 40px;
    padding: 0 0.9rem;
    font-size: 0.84rem;
  }
}
