/* Masonry Container using CSS Columns */
.masonry-container {
    column-count: 2;
    column-gap: 16px;
    padding: 0 8px 0px 4px;
    margin-bottom: 0rem;
  }
  
  /* Tablet: 3 columns */
  @media (min-width: 768px) {
    .masonry-container {
      column-count: 3;
      column-gap: 20px;
      padding: 0 12px;
    }
  }
  
  /* Desktop: 4 columns */
  @media (min-width: 1024px) {
  .masonry-container {
    column-count: 5; /* Antes estaba en 4 */
    column-gap: 20px; /* Reduje un poco el gap para que no se vea tan apretado */
    padding: 0 16px;
  }
}

/* Large Desktop: Mantener o ajustar si es necesario */
@media (min-width: 1440px) {
  .masonry-container {
    column-count: 5; 
    column-gap: 24px;
  }
}
  
  /* Product Card */
  .product-card-popular {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    transition: all 0.3s ease;
    display: inline-block;
    width: 100%;
  }
  
  .product-card-popular:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
  }
  
  /* Image Container */
  .product-image-container-popular {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
  }
  
  .product-image-popular {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }
  
  /* Favorite Button */
  .favorite-btn-popular {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
  }
  
  .favorite-btn-popular:hover {
    background: #ffffff;
    transform: scale(1.1);
  }
  
  .favorite-btn-popular i {
    font-size: 16px;
    color: #dc3545;
  }
  
  .favorite-btn-popular .bi-heart {
    color: #6c757d;
  }
  
  /* Product Info */
  .product-info-popular {
    padding: 4px 12px 4px 12px;
  }
  
  .product-title-popular {
    font-size: 13px;
    margin: 0 0 2px 0;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .product-price-popular {
    font-size: 12px;
    font-weight: 700;
    /* color: #198754; */
    margin: 0px;
  }
  
  /* Product Buttons */
  .product-buttons-popular {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    width: 100%;
    padding: 0px 12px 12px 12px;
  }
  
  /* Apple-inspired minimalist button styles */
  .btn-cart-popular, .btn-buy-popular {
    text-align: center;
    text-decoration: none;
    flex: 1;
    font-size: calc(var(--size-texto) - 4px);
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.01em;
  }
  
  /* Add to Cart button - white with black border */
  .btn-cart-popular {
    background-color: white;
    color: black;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    width: 100%;
  }
  
  .btn-cart-popular:hover {
    background-color: #f9f9f9;
  }
  
  /* Buy Now button - black with white text */
  .btn-buy-popular {
    background-color: var(--primary-color);
    color: white;
    border: 0.5px solid var(--primary-color);
  }
  
  .btn-buy-popular:hover {
    background-color: #1a1a1a;
  }
  
  /* Mobile Adjustments */
  @media (max-width: 767px) {
    .product-card-popular {
      margin-bottom: 12px;
      border-radius: 12px;
    }
  
    .product-info-popular {
      padding: 12px 12px 0 12px;
    }
  
    .product-title-popular {
      font-size: 14px;
    }
  
    .product-price-popular {
      font-size: 13px;
    }
  
    
  
    .favorite-btn-popular {
      width: 30px;
      height: 30px;
      top: 8px;
      right: 8px;
    }
  
    .favorite-btn-popular i {
      font-size: 16px;
    }
  }

  @media (max-width: 576px) {
    .logo-search-bar{
      gap: 0.5rem !important;
    }
  
    .product-buttons-popular {
        flex-direction: column;
        gap: 4px;
    }
    
    
    
    .btn-cart-popular, .btn-buy-popular {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
  }
  
  @media (min-width: 577px) and (max-width: 768px) {
    .product-buttons-popular {
        flex-direction: column;
        gap: 4px;
    }
    
  }
  
  
  