/* Últimos ingresos: portada + página dedicada */

.home-news-panel:not(.ultimos-ingresos-visible) {
  display: none !important;
}

.home-news-panel.ultimos-ingresos-visible {
  display: grid !important;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.home-news-panel.ultimos-ingresos-visible .home-news-panel-content {
  width: auto !important;
  max-width: none;
}

.home-news-products {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--ultimos-count, 4), minmax(0, 155px));
  justify-content: end;
  align-items: stretch;
  gap: 12px;
  padding: 24px 26px 24px 0;
}

.home-news-product {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: #1f2933;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(35, 47, 62, 0.10);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(35, 47, 62, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-news-product:hover,
.home-news-product:focus-visible {
  color: #1f2933;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(35, 47, 62, 0.22);
}

.home-news-product-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}

.home-news-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-news-product-no-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.home-news-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 11px 12px;
}

.home-news-product-price-old {
  min-height: 1em;
  color: #7b8490;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: line-through;
}

.home-news-product-price {
  margin-top: 2px;
  color: #b4233a;
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.1;
}

.home-news-product-title {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #1f2933;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-news-product-group {
  margin-top: auto;
  padding-top: 7px;
  overflow: hidden;
  color: #6b7280;
  font-size: 0.68rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ultimos-ingresos-page {
  min-height: 60vh;
  background: #f3f4f6;
}

.ultimos-ingresos-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 26px 28px;
  background: #ffffff;
  border: 1px solid rgba(35, 47, 62, 0.09);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(35, 47, 62, 0.08);
}

.ultimos-ingresos-heading h1 {
  margin: 4px 0 8px;
  color: #1f2933;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
}

.ultimos-ingresos-heading p {
  max-width: 720px;
  margin: 0;
  color: #66717d;
}

.ultimos-ingresos-eyebrow {
  color: #b4233a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ultimos-ingresos-back {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: #1f2933;
  text-decoration: none;
  background: #f2f4f6;
  border-radius: 999px;
  font-weight: 750;
}

.ultimos-ingresos-back:hover,
.ultimos-ingresos-back:focus-visible {
  color: #b4233a;
}

.ultimos-ingresos-product-card {
  height: 100%;
}

.ultimos-ingresos-no-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 210px;
  color: #7b8490;
  background: #f5f6f7;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .home-news-panel.ultimos-ingresos-visible {
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  }

  .home-news-products {
    grid-template-columns: repeat(2, minmax(0, 155px));
  }
}

@media (max-width: 760px) {
  .home-news-panel.ultimos-ingresos-visible {
    grid-template-columns: 1fr;
  }

  .home-news-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    padding: 0 22px 26px;
  }

  .home-news-product-title {
    font-size: 0.84rem;
  }

  .ultimos-ingresos-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .home-news-products {
    gap: 10px;
  }

  .home-news-product-body {
    padding: 9px 9px 11px;
  }
}