/* General Body and Container */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    display: flex;
    padding: 20px 80px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start; /* Align items to the top */
}

/* --- Sticky Sidebar --- */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky; /* Makes the sidebar stick */
    top: 20px; /* Sets the distance from the top when scrolling */
    height: calc(100vh - 40px); /* Prevents the sidebar from pushing the page down */
    overflow-y: auto; /* Adds a scrollbar if sidebar content is too long */
}

.sidebar-section {
    margin-bottom: 35px;
}

.sidebar h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #111;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    margin: 12px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #555;
    font-size: 1rem;
    transition: color 0.2s;
}

.sidebar ul li a:hover {
    color: #E03A3E;
}

/* Style for the active category link */
.sidebar ul li a.active {
    color: #E03A3E;
    font-weight: 600;
}

.sidebar label {
    font-weight: 600;
    color: #333;
}

#price-value {
    font-weight: normal;
    color: #E03A3E;
}

.price-slider input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    background: #ddd;
    height: 5px;
    border-radius: 5px;
    outline: none;
    margin-top: 10px;
}

.price-slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #E03A3E;
    cursor: pointer;
    border-radius: 50%;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

/* Products Section */
.products {
    flex: 1;
}

.products h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000;
}

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

.product-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; /* Changed from grid to flex */
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-image-container {
  position: relative;
  background-color: #f7f7f7;
  padding: 10px;
}

.product-image-container img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.shop-button {
  background: #fff;
  color: #111;
  border: none;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.product-card:hover .shop-button {
  transform: scale(1);
}

.product-info {
  padding: 15px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #E03A3E;
  margin-top: 5px;
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static; /* Remove sticky behavior on smaller screens */
        height: auto;
    }
}
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .container {
        padding: 20px;
    }
}

