/**
 * Rafas Latest Products - Frontend Styles
 * Version: 1.0.4
 *
 * Changelog v1.0.4:
 * - Fix: Proporción rectangular en lugar de cuadrada (más horizontal)
 * - Fix: min-height reducido y max-height agregado
 * - Móvil: 180-220px (antes 200px)
 * - Desktop: 200-280px (antes 250px)
 *
 * Changelog v1.0.3:
 * - Fix: Border-radius ahora en contenedor con overflow hidden
 * - Fix: object-fit: cover en lugar de contain para llenar espacio
 * - Fix: Layout responsive - vertical en móvil, horizontal en desktop
 * - Fix: Imagen con altura mínima (200px móvil, 250px desktop)
 * - Fix: Imagen ocupa 100% del contenedor para mejor visualización
 *
 * Changelog v1.0.2:
 * - Version bump para forzar recarga de CSS en navegadores
 *
 * Changelog v1.0.1:
 * - Fix: Agregar espacio entre imagen y contenido
 * - Fix: Precio en color rojo (#D10E10)
 * - Fix: Título siempre en negro con !important
 * - Fix: Bordes redondeados en imágenes (border-radius: 10px)
 */
.latest-products {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding: 0px 10px;
}
@media screen and (min-width: 1440px) {
  .latest-products {
    padding: 0 !important;
  }
}
.latest-products ul {
  padding: 0;
  margin: 0;
  display: grid;
  --grid-row-gap: 35px;
  --grid-column-gap: 30px;
  align-items: stretch;
  grid-template-columns: repeat(1, 1fr) !important;
  grid-column-gap: var(--grid-column-gap);
  grid-row-gap: var(--grid-row-gap);
}
@media screen and (min-width: 1440px) {
  .latest-products ul {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
.latest-products ul li {
  list-style-type: none;
}
.latest-products .wrapper {
  display: flex;
  flex-direction: column; /* Fix: Stack vertical en móvil */
  gap: 20px;
  height: auto;
  border-radius: 10px;
  border-style: solid;
  border-width: 1px;
  border-color: #f1f1f1;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
  padding: 10px 10px 40px 10px;
}

/* Desktop: layout horizontal */
@media screen and (min-width: 768px) {
  .latest-products .wrapper {
    flex-direction: row;
  }
}

.latest-products .wrapper .img-wrapper {
  flex: 1;
  min-height: 180px; /* Fix: Altura reducida para proporción rectangular */
  max-height: 220px; /* Fix: Máximo para mantener proporción */
  overflow: hidden; /* Fix: Necesario para que border-radius funcione */
  border-radius: 10px; /* Fix: Border-radius en el contenedor */
  background-color: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop: altura rectangular proporcionada */
@media screen and (min-width: 768px) {
  .latest-products .wrapper .img-wrapper {
    min-height: 200px;
    max-height: 280px; /* Fix: Rectangular en lugar de cuadrado */
  }
}

.latest-products .wrapper .img-wrapper img {
  width: 100%; /* Fix: Ocupar todo el ancho del contenedor */
  height: 100%;
  object-fit: cover; /* Fix: Cover en lugar de contain para llenar */
  display: block;
}
.latest-products .wrapper .content-wrapper {
  flex: 1;
}
.latest-products .wrapper .content-wrapper h2 {
  font-size: 15px;
  color: #000 !important; /* Fix: Título siempre negro */
}

/* Fix: Precio en rojo */
.latest-products .wrapper .content-wrapper .product-price {
  color: #D10E10 !important;
  font-weight: 600;
  font-size: 18px;
  margin: 10px 0;
}

/* Fix: Asegurar que el precio de WooCommerce sea rojo */
.latest-products .wrapper .content-wrapper .product-price .woocommerce-Price-amount,
.latest-products .wrapper .content-wrapper .product-price .amount {
  color: #D10E10 !important;
}
.product-button {
  background-color: #D10E10;
  color: #FFF;
  width: 205px;
  border-radius: 50px;
  padding: 20px 30px;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  font-family: "Rubik", Sans-serif;
  display: inline-block;
}
.product-icon {
  width: 20px;
  height: 20px;
}
.product-icon svg {
  color: red;
  fill: #fff;
  font-weight: 800;
  width: 1rem;
  height: 1rem;
}
.brand-image-wrapper {
  text-align: center;
}
.brand-image-wrapper svg,
.brand-image-wrapper img {
  max-width: 100px;
}
