.products-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.products-hero-content {
  position: relative;
  z-index: 1;
}

.products-hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  font-weight: 500;
}

.products-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 400;
  display: block;
  margin-bottom: 0;
  color: #e0e0e0;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

.products-main {
  padding: 60px 0;
}

.products-controls {
  margin-bottom: 2rem;
}

.filter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #667eea;
}

.filter-search {
  flex: 2;
  min-width: 200px;
}

.filter-search {
  position: relative;
}

.filter-search input {
  padding-right: 45px;
}

.search-btn {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: #667eea;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #5568d3;
}

.clear-filters-btn {
  padding: 0.75rem 1.5rem;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease;
  align-self: flex-end;
}

.clear-filters-btn:hover {
  background: #e0e0e0;
}

.products-content {
  margin-top: 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.product-thumb {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: #f5f5f5;
}

.product-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 0.9rem;
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.quick-view-btn {
  background: white;
  color: #333;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.quick-view-btn:hover {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-header {
  margin-bottom: 0.75rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-category {
  font-size: 0.85rem;
  color: #667eea;
  background: #f0f0ff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  display: inline-block;
}

.product-price {
  margin-bottom: 0.5rem;
}

.current-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.original-price {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.product-stock {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.in-stock {
  color: #28a745;
  font-weight: 600;
}

.out-of-stock {
  color: #dc3545;
  font-weight: 600;
}

.product-actions {
  margin-top: 1rem;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.75rem 1.25rem;
  background: white;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.no-products {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-products-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-products h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.no-products p {
  color: #666;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .products-stats {
    gap: 2rem;
  }

  .filter-form {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 450px) {
    .products-main {
        padding: 20px 0;
    }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 0;
  }

  .product-info {
    padding: 7px;
  }

  .product-header {
    margin-bottom: 0;
  }

  .product-title {
    margin-bottom: 0;
  }

  .product-price {
    margin-bottom: 0;
  }

  .product-stock {
    margin-bottom: 0;
  }

  .product-actions {
    margin-top: 5px;
  }
}
