/**
 * Rafas Latest Products - Frontend Styles
 * Version: 1.0.6
 *
 * Changelog v1.0.5:
 * - Fix: content-wrapper centrado (text-align: center, align-items: center)
 *
 * 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;
}
/* Layout: siempre horizontal, imagen izquierda + contenido derecha */
.latest-products .wrapper {
  display: flex;
  flex-direction: row;
  height: auto;
  border-radius: 5px;
  border: 1px solid #f1f1f1;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
  padding: 10px;
}

/* Imagen: ancho fijo, columna para imagen + logo de marca abajo */
.latest-products .wrapper .img-wrapper {
  width: 120px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  .latest-products .wrapper .img-wrapper {
    width: 160px;
    min-width: 160px;
  }
}

.latest-products .wrapper .img-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Contenido: ocupa el resto del espacio, alineado a la izquierda */
.latest-products .wrapper .content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
  align-items: flex-start;
  padding: 0 10px;
  overflow: visible;
}

.latest-products .wrapper .content-wrapper .inner {
  flex: 1;
  width: 100%;
}

.latest-products .wrapper .content-wrapper h2 {
  text-align: left;
  padding-left: 10px;
  word-break: break-word;
  font-size: 15px;
  color: #D10E10 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  margin-bottom: 5px;
}

@media screen and (min-width: 768px) {
  .latest-products .wrapper .content-wrapper h2 {
    font-size: 1.2rem !important;
  }
}

/* SKU / Código */
.latest-products .wrapper .content-wrapper .sku-wrapper {
  display: flex;
  padding-left: 10px;
  margin-bottom: 2px;
}
.latest-products .wrapper .content-wrapper .sku-label {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: #555;
}
.latest-products .wrapper .content-wrapper .sku-label strong {
  margin-left: 5px;
  color: #000;
}

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

@media screen and (min-width: 768px) {
  .latest-products .wrapper .content-wrapper .product-price {
    font-size: 1.4rem;
  }
}

.latest-products .wrapper .content-wrapper .product-price .woocommerce-Price-amount,
.latest-products .wrapper .content-wrapper .product-price .amount {
  color: #D10E10 !important;
}

/* Wrapper del botón */
.latest-products .wrapper .content-wrapper .actions-wrapper {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
  width: 100%;
}

.product-button {
  background-color: #D10E10;
  color: #FFF;
  border-radius: 40px;
  padding: 10px 20px;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  font-family: "Rubik", Sans-serif;
  display: inline-block;
  max-width: 200px;
}

@media screen and (min-width: 768px) {
  .product-button {
    font-size: 1rem;
    padding: 12px 25px;
  }
}

.product-icon {
  width: 20px;
  height: 20px;
}
.product-icon svg {
  color: red;
  fill: #fff;
  font-weight: 800;
  width: 1rem;
  height: 1rem;
}

/* Logo de marca debajo de la imagen del producto */
.brand-image-wrapper {
  text-align: center;
  width: 80px;
  margin: 6px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-image-wrapper svg,
.brand-image-wrapper img {
  max-width: 100%;
  width: 80px;
  display: inline-block;
  height: auto;
  visibility: visible !important;
  opacity: 1 !important;
}
