/* Add padding to the main section for better spacing around the content */
.section {
  padding: 40px 20px; /* Added vertical and horizontal padding */
}

.ecommerce-container {
  display: flex;
  gap: 30px; /* Reduced gap for a tighter layout */
  max-width: 1200px; /* Added max-width for better readability on large screens */
  margin: 0 auto; /* Center the container */
}

.filter-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  align-self: flex-start; /* Align sidebar to the top */
}

.filter-sidebar h3 {
  margin-top: 0; /* Remove default top margin */
  margin-bottom: 20px;
}

.product-grid-container {
  flex-grow: 1;
}

.filter-group {
  margin-bottom: 25px; /* Slightly reduced margin */
}

.filter-group h4 {
  margin-bottom: 15px;
}

.filter-group .filter-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Consolidated and improved filter button styles */
.filter-btn {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px 15px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 5px;
  font-size: 1.4rem;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--background-light);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px); /* Reduced hover effect slightly */
  box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Enhanced shadow on hover */
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  margin-bottom: 10px;
  font-size: 1.8rem; /* Adjusted font size */
}

.product-price {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .ecommerce-container {
    flex-direction: column;
  }

  .filter-sidebar {
    width: 100%;
    margin-bottom: 30px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-info h3 {
    font-size: 1.6rem;
  }

  .product-price {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
