:root {
  --accent: #e85b6b;
  --muted: #eef0f2;
  --card-bg: #fff;
  --frame: #e6e9eb;
  --text: #263238;
  --container-gap: 20px;
  --thumb-size: 18px;
}

* { box-sizing: border-box; }

body {
  display: flex;
  justify-content: center; 
  align-items: flex-start; 
  min-height: 100vh;
  margin: 0;
  
  background: #f7f9fb;

}

.wrap {
  max-width: 1200px;
  margin: 20px auto;
  padding: 18px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

header { text-align: center; padding: 10px 0 18px; }
.brand {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 1px;
}
.brand .amp { color: var(--accent); font-weight: 700; margin: 0 6px; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--container-gap);
  align-items: start;
}

.cards {
  display: grid;
  gap: 18px;
  justify-items: center; 
}

.card {
  width: 100%;
  max-width: 400px; 
  background: var(--card-bg);
  border: 1px solid var(--frame);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}

.card .imgwrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #ddd;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.card .body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
}

.title { font-size: 16px; }
.muted { color: #6b7880; font-size: 14px; }

.sitefoot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--frame);
  font-size: 14px;
  color: #6b7880;
}

/* ===== FILTERS ===== */
.filters {
  background: var(--card-bg);
  border: 1px solid var(--frame);
  padding: 14px;
  border-radius: 8px;
  align-self: start;
  height: fit-content;
}
.filters h4 { margin: 0 0 10px 0; font-weight: 600; }

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.filter-label {
  background: var(--muted);
  border: 1px solid var(--frame);
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  transition: background 0.2s;
}
.filter-label:hover { background: #dce1e5; }
.filter-input:checked + .filter-label { background: var(--accent); color: #fff; }
.filter-input { display: none; }

#filter-pyroh:checked ~ .card:not(.pyroh),
#filter-rulet:checked ~ .card:not(.rulet),
#filter-syrnyky:checked ~ .card:not(.syrnyky),
#filter-tistechko:checked ~ .card:not(.tistechko),
#filter-tort:checked ~ .card:not(.tort) { display: none; }

.slider-wrap { margin-bottom: 10px; }
.static-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg,#e9edf0,#eef3f5);
  border-radius: 6px;

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);

}

.double-range {
  position: relative;
  height: var(--thumb-size);
  margin-top: -12px;
}
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: var(--thumb-size);
  background: transparent; position: absolute; left: 0; top: 0;
  pointer-events: auto;

}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb-size); height: var(--thumb-size);
  border-radius: 50%; background: #fff;
  border: 3px solid #2d3a42; box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  margin-top: -6px;
}
input[type=range]::-moz-range-thumb {
  width: var(--thumb-size); height: var(--thumb-size);
  border-radius: 50%; background: #fff;
  border: 3px solid #2d3a42; box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.slider-values {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #586770; margin-top: 8px;
}



@media (max-width: 729px) {
  .main-grid { display: flex; flex-direction: column; }
  .filters { order: -1; margin-bottom: 20px; width: 100%; }
  .cards { grid-template-columns: 1fr; width: 100%; }
  .cards .card:nth-of-type(n + 4) { display: none; }
  .slider-wrap { display: none; }
  .sitefoot { text-align: left; }
}

@media (min-width: 730px) and (max-width: 999px) {
  .main-grid { display: flex; flex-direction: column; }
  .filters { order: -1; margin-bottom: 20px; width: 100%; }
  .cards { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .cards .card:nth-of-type(n + 7) { display: none; }
  .slider-wrap { display: none; }
  .sitefoot { text-align: center; }
}

@media (min-width: 1000px) {
  .main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }
  .cards { grid-template-columns: repeat(3, 1fr); width: 100%; }
  .slider-wrap { display: block; }
  .sitefoot { text-align: right; }
}
