/* ==========================================
   PRODUCTS.CSS - PRODUCTS PAGE STYLES
   USING FLEXBOX ONLY (NO CSS GRID)
   RESPONSIVE: 5 cols (desktop), 3 cols (tablet), 2 cols (mobile)
   ========================================== */

/* Filter and Search Container */
.filter-search-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
}

.filter-select {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  background: #fff;
  min-width: 200px;
}

/* Products Grid - FLEXBOX ONLY */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Desktop: 5 products per row */
@media (min-width: 1024px) {
  .products-grid .product-card {
    flex: 1 1 calc(20% - 1.5rem);
    max-width: calc(20% - 1.5rem);
  }
}

/* Tablet: 3 products per row */
@media (min-width: 600px) and (max-width: 1023px) {
  .products-grid .product-card {
    flex: 1 1 calc(33.333% - 1.5rem);
    max-width: calc(33.333% - 1.5rem);
  }
}

/* Mobile: 2 products per row */
@media (max-width: 599px) {
  .products-grid .product-card {
    flex: 1 1 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
  }
  
  .filter-search-container {
    flex-direction: column;
  }
  
  .search-input,
  .filter-select {
    width: 100%;
  }
}

/* Product Card Specific Styles */
.products-grid .product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.products-grid .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.products-grid .product-image-box {
  width: 100%;
  height: 180px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.products-grid .product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.products-grid .product-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.products-grid .product-title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  min-height: 2.4em;
}

.products-grid .product-rating {
  color: #f39c12;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.products-grid .product-price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.products-grid .product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.products-grid .product-actions button {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.85rem;
}
