/* Tarjeta de producto (destacados, grid de productos, relacionados, favoritos)
   El alto es el mismo sin importar el contenido: filas de altura fija
   (imagen cuadrada, nombre a 2 líneas, precio, cuotas). */

.destacados-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.destacados-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.destacados-head span {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 340px;
  margin: 0;
  text-align: right;
}

.itemDestacado {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.itemDestacado:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.imageDestacado {
  background: var(--bg-2);
  border-radius: var(--radius-md);
  aspect-ratio: 1 / 1;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.imageDestacado img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
}

.textCard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* nombre (2 líneas) + precio + cuotas, con o sin cuotas/precio tachado */
  height: 110px;
  flex-shrink: 0;
  overflow: hidden;
}

.textCard > span:first-child {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  /* siempre ocupa 2 líneas; el excedente se corta con "…" */
  height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* nombres largos sin espacios también quiebran */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
  height: 26px;
  flex-shrink: 0;
  white-space: nowrap;
}

.prices .dashed {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(160, 165, 172, 0.6);
}

.prices .priceNow {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.prices .priceNow::before {
  content: "$";
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-right: 2px;
}

.cuotas {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
  height: 25px;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.actionsDestacados {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}

.listDestacados {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* ---- Estado desde la base de datos ---- */
.imageDestacado {
  position: relative;
  text-decoration: none;
}

.cardBadge-sale,
.cardBadge-out {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue, #3b82f6);
}

.cardBadge-out {
  background: rgba(20, 22, 28, 0.85);
}

/* Envío gratis: abajo a la izquierda para no pisar oferta / sin stock */
.cardBadge-ship {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #34d399;
  background: rgba(13, 15, 18, 0.82);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.cardBadge-ship svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.itemDestacado.is-out .imageDestacado img {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.itemDestacado .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Estado de carga de las grillas */
.listDestacados .cardSkeleton {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-height: 380px;
  background: linear-gradient(90deg, var(--bg-1) 25%, var(--bg-2) 50%, var(--bg-1) 75%);
  background-size: 200% 100%;
  animation: cardShimmer 1.2s infinite;
}

@keyframes cardShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Estado vacío de una grilla/carrusel de productos */
.catalogEmpty {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  color: var(--ink-soft);
}

.catalogEmpty svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
  opacity: 0.5;
  margin-bottom: 6px;
}

.catalogEmpty h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.catalogEmpty p {
  margin: 0;
  font-size: 14px;
  max-width: 420px;
}

.catalogEmpty .btn,
.catalogEmpty .btn-text {
  margin-top: 12px;
}

.carouselWrap.is-empty .carousel-arrow {
  display: none !important;
}
