/* ============================================================
   PRODUCT CARD
   ============================================================ */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}


/* ============================================================
   LINK (stretched — covers the whole card, handles navigation)
   ============================================================ */

.product-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: inherit;
  text-decoration: none;
}


/* ============================================================
   MEDIA
   ============================================================ */

.product-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
}

.product-card__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  padding: 8%;
  mix-blend-mode: multiply;
  transform: scale(1);
  transition:
    transform 700ms var(--ease-apple);
}


/* ============================================================
   BADGE
   ============================================================ */

.product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-foreground);
  color: var(--color-background);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ============================================================
   ARROW
   ============================================================ */

.product-card__arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: rgb(255 255 255 / 92%);
  color: var(--color-foreground);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--transition-base),
    transform var(--transition-base),
    background-color var(--transition-base),
    color var(--transition-base);
}


/* ============================================================
   CONTENT
   ============================================================ */

.product-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 1.25rem;
}


/* ============================================================
   CATEGORY & TAG
   ============================================================ */

.product-card__category {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-muted-foreground);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.product-card__category-name {
  display: inline-flex;
  align-items: center;
}

.product-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-strong);
  color: var(--color-foreground);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ============================================================
   TITLE
   ============================================================ */

.product-card__title {
  display: -webkit-box;
  min-height: 2rem;
  margin: 0;
  overflow: hidden;
  color: var(--color-foreground);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}


/* ============================================================
   PRICING
   ============================================================ */

.product-card__pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.product-card__price {
  color: var(--color-foreground);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-card__installments {
  color: var(--color-muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.product-card__installment-amount {
  margin-left: 0.15rem;
}


/* ============================================================
   FOOTER
   ============================================================ */

.product-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.875rem;
}


/* ============================================================
   AVAILABILITY
   ============================================================ */

.product-card__availability {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.product-card__availability-dot {
  width: 0.375rem;
  height: 0.375rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background-color: currentColor;
}

.product-card__availability--in_stock {
  color: var(--color-accent-strong);
}

.product-card__availability--out_of_stock {
  color: var(--color-muted-foreground);
}

.product-card__availability--consultation {
  color: var(--color-muted-foreground);
}


/* ============================================================
   ACTION
   ============================================================ */

.product-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.625rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-foreground);
  border-radius: var(--radius-full);
  color: var(--color-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base);
}

.product-card__action--cart {
  position: relative;
  z-index: 2;
  background-color: var(--color-foreground);
  color: var(--color-background);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.product-card__action--cart:active {
  transform: scale(0.98);
}

.product-card__action--whatsapp {
  position: relative;
  z-index: 2;
  gap: 0.4rem;
  background-color: #25d366;
  border-color: #25d366;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.product-card__action--whatsapp:hover,
.product-card:hover .product-card__action--whatsapp {
  background-color: #1ebe5d;
  border-color: #1ebe5d;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

.product-card__action--whatsapp:active {
  transform: scale(0.98);
  background-color: #17a84f;
}

.product-card__action-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.product-card__action--whatsapp:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 2px;
}


/* ============================================================
   HOVER (triggered by hovering anywhere on the card, since the
   stretched .product-card__link covers it entirely)
   ============================================================ */

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

.product-card:hover .product-card__arrow {
  opacity: 1;
  transform: translateY(0);
  background-color: var(--color-accent);
  color: var(--color-accent-foreground);
}

.product-card:hover .product-card__action--consultation {
  background-color: var(--color-foreground);
  border-color: var(--color-foreground);
  color: var(--color-background);
}

.product-card__action--cart:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-foreground);
}


/* ============================================================
   FOCUS
   ============================================================ */

.product-card__link:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.product-card__action--cart:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .product-card__image,
  .product-card__arrow,
  .product-card__action {
    transition: none;
  }
}