.page-wrap {
  max-width: 1400px;
  padding: 1.5rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

/* Gumb koji otvara filter */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #111;
  color: #fff;
  border: 1px solid #111;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  padding: .75rem 1rem;
  cursor: pointer;
}
.filter-toggle svg {
  color: currentColor;
}

/* Drawer sa strane */
.filter-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(90%, 320px);
  max-width: 320px;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: #fff;
  padding: 1rem 1rem 6rem;
  border-right: 1px solid #e5e5e5;
  box-shadow: 40px 0 80px rgba(0,0,0,.4);
  z-index: 9999;

  transform: translateX(-110%);
  transition: transform .2s ease;
}
.filter-sidebar.active {
  transform: translateX(0%);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.filter-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.filter-close {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  line-height: 1;
  font-size: .8rem;
  color: #111;
  font-weight: 500;
  cursor: pointer;
}

/* Sekcije unutar filtera */
.filter-block {
  border-top: 1px solid #eee;
  padding-top: .75rem;
  margin-top: .75rem;
}
.filter-block:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

/* Header svake sekcije (klik za collapse) */
.filter-block-head {
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 .5rem 0;
  width: 100%;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #111;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.filter-block-head .chevron {
  font-size: .7rem;
  color: #999;
  transition: transform .15s;
}

/* Collapsible tijelo */
.filter-block-body {
  display: grid;
  gap: .5rem;
  font-size: .8rem;
  line-height: 1.3;
  color: #222;
  overflow: hidden;
  max-height: 0;
  transition: max-height .2s ease;
}
.filter-block-body.open {
  max-height: 800px;
}

/* Checkbox redovi */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  font-weight: 500;
  position: relative;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #c40000;
  cursor: pointer;
  margin-top: 1px;
}
.checkbox-row span {
  display: inline-block;
  color: #222;
}
.tag-used {
  background: #c40000;
  color: #fff;
  font-size: .6rem;
  line-height: 1;
  font-weight: 600;
  padding: .2rem .4rem;
  border-radius: 4px;
  margin-left: .4rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Chip checkboxi (za Condition) */
.filter-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip-check {
  position: relative;
  font-size: .75rem;
  line-height: 1.2;
  font-weight: 500;
  cursor: pointer;
}
.chip-check input[type="checkbox"] {
  display: none;
}
.chip-check span {
  display: inline-block;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  color: #222;
  background: #fafafa;
  transition: all .15s;
}
.chip-check input[type="checkbox"]:checked + span {
  background: #c40000;
  color: #fff;
  border-color: #c40000;
  box-shadow: 0 8px 16px rgba(196,0,0,.28);
}

/* Price range */
.price-row {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
}
.price-input {
  flex: 1;
  display: grid;
  gap: .25rem;
}
.price-input label {
  font-size: .7rem;
  color: #666;
  font-weight: 500;
  line-height: 1.2;
}
.price-input input[type="number"] {
  width: 100%;
  padding: .5rem .6rem;
  font-size: .8rem;
  line-height: 1.2;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  -moz-appearance: textfield;
}
.price-input input[type="number"]:focus {
  border-color: #111;
}
.price-input input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dash {
  font-size: .8rem;
  font-weight: 500;
  color: #666;
  padding-bottom: .5rem;
}
.hint {
  font-size: .7rem;
  line-height: 1.3;
  color: #888;
  margin-top: .4rem;
}

/* Donji dio (Apply / Clear) */
.filter-actions {
border-top: 1px solid #eee;
margin-top: 1rem;
padding-top: 1rem;
display: grid;
gap: .5rem;
position: sticky;
bottom: 0;
left: 0;
right: 0;
background: #fff;
box-shadow: 0 -12px 24px rgba(0,0,0,.08);
padding-bottom: 1rem;
}
.apply-btn {
background: #111;
color: #fff;
border: 1px solid #111;
border-radius: 8px;
font-weight: 600;
line-height: 16px;
padding-top: 10px;
padding-bottom: 10px;
cursor: pointer;
transition: all .15s;
width: 100%;
font-size: 13px;
}
.apply-btn:hover {
background: #c40000;
border-color: #c40000;
box-shadow: 0 12px 24px rgba(196,0,0,.28);
}
.clear-btn {
background: #fff;
color: #666;
border: 1px solid #ccc;
border-radius: 8px;
font-weight: 500;
font-size: 13px;
line-height: 16px;
padding-top: 10px;
padding-bottom: 10px;
cursor: pointer;
transition: all .15s;
width: 100%;
}
.clear-btn:hover {
color: #111;
border-color: #999;
}
.reset-btn {
background: #c40000;
color: #fff;
border: 0;
border-radius: 6px;
font-weight: 600;
font-size: 14px;
line-height: 16px;
text-decoration: none;
display: inline-block;
text-align: center;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
padding-top: 10px;
padding-bottom: 10px;
}
.reset-btn:hover {
background-color: #666;
}
