.libro-card {
  position: relative; /* nuevo contexto para etiqueta */
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.libro-card__cover {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.3s ease;
}

.libro-card:hover .libro-card__cover {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
}

.libro-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.libro-card:hover .libro-card__cover img {
  transform: scale(1.05);
  filter: brightness(0.45);
}

.libro-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.libro-card:hover .libro-card__overlay {
  opacity: 1;
}

.libro-card__overlay-btn {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.libro-card__overlay-btn--carrito {
  background: var(--bg-body);
  color: var(--text-primary);
}

.libro-card__overlay-btn--carrito:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.libro-card__overlay-btn--detalle {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
}

.libro-card__overlay-btn--detalle:hover {
  background: var(--bg-body);
  color: var(--text-primary);
}

.libro-card__etiqueta {
    position: absolute;
    top: -19px;
    left: 0px;
    z-index: 3;
    display: flex
;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 8px 83px 8px 1px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--pr-white);
    clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%);
}

.libro-card__etiqueta i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.6rem;
}

.libro-card__etiqueta--pre {
  background: var( --pr-etiqueta-preventa);
}

.libro-card__etiqueta--nue {
  background: var( --pr-etiqueta-nuevo);
}

.libro-card__etiqueta--des {
  background: var(--pr-etiqueta-destacado);
}

.libro-card__titulo {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 200;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    margin: 0.65rem 0 0;
    line-height: 1.75;
    text-align: center;
}

@media (hover: none), (max-width: 767px) {
  .libro-card__cover img {
    transform: none;
    filter: none;
  }

  .libro-card:hover .libro-card__cover img {
    transform: none;
    filter: none;
  }

  .libro-card__overlay {
    opacity: 1;
    justify-content: flex-end;
    padding-bottom: 0.6rem;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 10%,
      rgba(0, 0, 0, 0.62) 100%
    );
  }

  .libro-card__overlay-btn {
    font-size: 0.62rem;
    padding: 8px 6px;
    gap: 4px;
  }

  .libro-card__titulo {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .libro-card__precio {
    font-size: 1rem;
  }

  .libro-card__etiqueta {
    top: -8px;
    font-size: 0.62rem;
    padding: 4px 30px 4px 1px;
    letter-spacing: 0.06em;
  }
}
.libro-card__precio {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--pr-gray-1200);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
