/* Happy People WooCommerce Products Grid */
.happy-people-grid {
  margin: 40px 0;
}

.hp-carousel-container {
  position: relative;
  overflow: hidden;
  margin: 0 -10px;
}

.hp-products-track {
  display: flex;
  gap: 20px;
  margin: 20px;
  padding: 0;
  will-change: transform;
  /* No transition by default for smooth infinite scroll */
}

.hp-carousel-container.hp-dragging .hp-products-track {
  transition: none;
}

.hp-product-card.hp-cloned {
  /* Cloned cards for infinite scroll */
}

.hp-product-card {
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  margin: 0 10px;
}

.hp-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.hp-product-image {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
}

.hp-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hp-product-card:hover .hp-product-image img {
  transform: scale(1.05);
}

.hp-product-content {
  padding: 20px;
  position: relative;
}

.hp-product-location {
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666666;
}

.hp-product-date {
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666666;
}

.hp-product-location::before {
  content: "\f3c5"; /* fa-map-marker-alt */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #666666;
  margin-right: 6px;
  font-size: 12px;
  display: inline-block;
  vertical-align: middle;
}

.hp-product-date::before {
  content: "\f133"; /* fa-calendar */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #666666;
  margin-right: 6px;
  margin-top: -3px;
  font-size: 12px;
  display: inline-block;
  vertical-align: middle;
}

.hp-product-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
margin-top: 10px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hp-product-description {
  font-size: 14px;
  font-family: "Roboto", sans-serif;
  color: #000000;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.hp-product-category {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.hp-category-icon-img {
  width: 35px;
  height: 35px;
}

.hp-see-more {
  background: #fff200;
  color: black;
  border: none;
  padding: 10px 40px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.1s ease;
  text-decoration: none;
  font-family: "Staatliches", display !important;
}

.hp-see-more:hover {
  background: black;
  color: white;
  text-decoration: none;
}

.hp-product-price {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hp-product-card {
    min-width: 250px;
    max-width: 280px;
  }
  .hp-product-image {
    height: 280px; /* Aumentado de 200px para más verticalidad */
  }
  .hp-product-content {
    padding: 15px;
  }
  .hp-product-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .hp-product-card {
    min-width: 220px;
    max-width: 250px;
    margin: 0 5px;
  }
  .hp-carousel-container {
    margin: 0 -5px;
  }
  /* CAMBIO PRINCIPAL: Imágenes más verticales en móviles */
  .hp-product-image {
    height: 320px; /* Aumentado significativamente de 180px */
    aspect-ratio: 4 / 5; /* Proporción más vertical */
  }
  .hp-product-image img {
    object-fit: cover;
    object-position: center; /* Centra la imagen */
  }
  .hp-product-title {
    font-size: 16px;
  }
  /* Ajustar el contenido para compensar la imagen más alta */
  .hp-product-content {
    padding: 12px 15px 15px 15px;
  }
  .hp-product-description {
    font-size: 13px;
    -webkit-line-clamp: 2; /* Reducir líneas de descripción */
    margin-bottom: 15px;
  }
}

/* Breakpoint adicional para móviles muy pequeños */
@media (max-width: 360px) {
  .hp-product-card {
    min-width: 200px;
    max-width: 220px;
  }
  .hp-product-image {
    height: 300px; /* Mantener proporción vertical */
    aspect-ratio: 3 / 4;
  }
}

/* Grid fallback for non-carousel mode */
.hp-grid-fallback {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.hp-grid-fallback .hp-product-card {
  margin: 0;
  max-width: none;
  flex-shrink: 1;
}

/* Static Grid Styles - Specific for 3 columns */
.hp-static-grid {
  margin: 40px 0;
}

.hp-static-grid .hp-grid-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 30px 20px; /* 30px vertical, 20px horizontal */
  margin: 0;
  padding: 0;
  overflow: visible;
}

/* Responsive para la grilla estática */
@media (max-width: 768px) {
  .hp-static-grid .hp-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 15px;
  }
}

@media (max-width: 480px) {
  .hp-static-grid .hp-grid-container {
    grid-template-columns: 1fr !important;
    gap: 20px;
    max-width: 280px;
    margin: 0 auto;
  }
  /* APLICAR EL MISMO ESTILO VERTICAL QUE EL CAROUSEL EN MÓVIL */
  .hp-static-grid .hp-product-card {
    min-width: 220px;
    max-width: 250px;
    margin: 0 5px;
  }
  .hp-static-grid .hp-product-image {
    height: 320px;
    aspect-ratio: 4 / 5;
  }
  .hp-static-grid .hp-product-image img {
    object-fit: cover;
    object-position: center;
  }
  .hp-static-grid .hp-product-title {
    font-size: 16px;
  }
  .hp-static-grid .hp-product-content {
    padding: 12px 15px 15px 15px;
  }
  .hp-static-grid .hp-product-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
    margin-bottom: 15px;
  }
}

@media (max-width: 360px) {
  .hp-static-grid .hp-product-card {
    min-width: 200px;
    max-width: 220px;
  }
  .hp-static-grid .hp-product-image {
    height: 300px;
    aspect-ratio: 3 / 4;
  }
}

/* Override carousel-specific styles for static grid */
.hp-static-grid .hp-product-card {
  /* Remove carousel constraints */
  min-width: unset !important;
  max-width: unset !important;
  flex-shrink: unset !important;
  margin: 0 !important;
  /* Keep the card design */
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

.hp-static-grid .hp-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

/* Ensure grid items take full width of their grid cell */
.hp-static-grid .hp-grid-item {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Make sure the track doesn't interfere */
.hp-static-grid .hp-products-track {
  display: contents !important;
  flex: unset !important;
  gap: unset !important;
  margin: unset !important;
  padding: unset !important;
}

/* Ensure consistent card heights in each row */
.hp-static-grid .hp-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hp-static-grid .hp-product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-static-grid .hp-product-description {
  flex: 1;
}

.hp-static-grid .hp-product-footer {
  margin-top: auto;
}