.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #111111;
  text-decoration: none;
}

.product-card__image-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7f7f5;
  border-radius: var(--product-card-corner-radius, 0.5rem);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  display: block;
  transition: transform 0.4s ease;
}

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

.product-card__image--primary {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.product-card__image--secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  background: #f7f7f5;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .product-card--with-hover-media:hover .product-card__image--primary {
    opacity: 0;
  }

  .product-card--with-hover-media:hover .product-card__image--secondary {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card:hover .product-card__image--primary,
  .product-card:hover .product-card__image--secondary {
    transform: none;
  }
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f5;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.product-card__placeholder svg {
  width: 50%;
  height: 50%;
  opacity: 0.4;
}

.product-card__tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #ffffff;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.product-card__tag--dark {
  background: #111111;
  color: #ffffff;
}

.product-card__quick {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111111;
  color: #ffffff;
  padding: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s ease;
  z-index: 3;
}

.product-card:hover .product-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.product-card__info {
  padding: 0 0.125rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  line-height: 1.3;
  color: #111111;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__name:hover {
  color: #6b6b6b;
}

.product-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.product-card__price {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111111;
}

.product-card__price-old {
  font-size: 0.8125rem;
  color: #6b6b6b;
  text-decoration: line-through;
}

.unit-price {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b6b6b;
  margin-top: 0.2rem;
}

/* Compatibilidad con clases antiguas .vs-card */
.vs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.vs-card__media {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f7f7f5;
  margin-bottom: 0.625rem;
  display: block;
}
.vs-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.vs-card:hover .vs-card__image {
  transform: scale(1.05);
}
.vs-card__body {
  padding: 0 0.125rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.vs-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  line-height: 1.3;
  color: #111111;
  text-decoration: none;
}
.vs-card__compare {
  font-size: 0.8125rem;
  color: #6b6b6b;
  text-decoration: line-through;
  margin-right: 0.35rem;
}
.vs-card__price {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111111;
}

/* ============ BADGES ============ */
/* ── Posición del distintivo (Oferta/Agotado), según la config del tema ── */
.product-card__badge {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  pointer-events: none;
  z-index: 1;
  bottom: 0.75rem;
  left: 0.75rem;
}

.product-card__badge.top {
  top: 0.75rem;
  bottom: auto;
}

.product-card__badge.right {
  right: 0.75rem;
  left: auto;
}

.product-card__badge-item {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  border-radius: 999px;
}

.product-card__badge-item--sale {
  background: #111111;
  color: #ffffff;
}

.product-card__badge-item--sold-out {
  background: #e2e8f0;
  color: #334155;
}

/* ── Badge de marca (vendor) ────────────────────────────────
   Posición base: esquina superior derecha de la imagen.
   Si el badge de estado (Oferta/Agotado) está configurado a la
   derecha, la marca salta a la izquierda (--left) para no chocar. */
.product-card__brand-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  border-radius: 999px;
  color: #111111;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.18);
  pointer-events: none;
}

.product-card__brand-badge--left {
  right: auto;
  left: 0.75rem;
}
