:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.2rem;
  color: var(--primary-dark);
}

header p {
  color: var(--muted);
  margin-top: 6px;
}

.back-icon {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.194);
  backdrop-filter: blur(6px);
  color: white;
  transition: background 0.25s ease, transform 0.2s ease;
}

.back-icon svg {
  width: 22px;
  height: 22px;
}

.back-icon:hover {
  background: rgba(79, 70, 229, 0.404);
  transform: scale(1.05);
}

.filters {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

#filterForm {
  width: 50%;
  margin: 0 auto;
}

/* Responsive: kalau layar <= 768px */
@media (max-width: 768px) {
  #filterForm {
    width: 100%;
  }
}

.row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group select {
  width: 100%; 
}

label {
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--muted);
}

input,
select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  background: #f9fafb;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: white;
}

/* Price section */
.price-section {
  text-align: center;
  margin-top: 10px;
}

.price-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.range-inputs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.range-inputs input {
  width: 120px;
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Products grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.product-card p {
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--muted);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding: 15px 20px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pagination-info {
  font-size: 14px;
  color: var(--muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
}

.pagination button:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.pagination button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.limit-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.limit-control select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
}

@media (max-width: 400px) {
  .row {
    gap: 12px;
  }
}

@media (max-width: 500px) {
  header{
    padding: 2rem;
    margin-bottom: 0;
  }
}