/* ========== Product Page Layout ========== */
.product-page {
  padding: 20px 40px;
  padding-top: 100px;
  font-family: "Lato", sans-serif;
}

/* Container with sidebar + grid */
.product-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

/* ========== Filter Sidebar ========== */
.filter-sidebar {
  width: 220px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
  height: calc(100vh - 120px); /* full height minus navbar/footer */
  position: sticky;
  top: 100px; /* stay below navbar */
  overflow-y: auto;
}

.filter-sidebar h3 {
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 700;
  color: #222;
}

.filter-group {
  margin-bottom: 15px;
}

.filter-group h4 {
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.filter-group label {
  font-size: 13px;
  color: #555;
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

/* Custom checkbox spacing */
.filter-group input {
  margin-right: 6px;
}

/* ========== Product Grid ========== */
.product-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-card h2 {
  font-size: 16px;
  margin: 8px 0;
  font-weight: 600;
  color: #222;
}

.product-card p {
  font-size: 13px;
  color: #666;
}

/* ========== Mobile Sidebar (Slide Out) ========== */
.filter-toggle {
  display: none;
  background: #e100ff;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 15px;
}

.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}

.filter-sidebar.active {
  transform: translateX(0);
}

.filter-overlay.active {
  display: block;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
  .product-container {
    flex-direction: column;
  }

  .filter-toggle {
    display: inline-block;
  }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* hidden offscreen */
    height: 100%;
    width: 240px;
    border-radius: 0;
    z-index: 999;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
  }

  .filter-sidebar.active {
    transform: translateX(0);
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
