.gf-collection-filter {
  --gf-filter-ink: #123047;
  --gf-filter-green: #2f7658;
  --gf-filter-green-soft: #edf5f0;
  --gf-filter-line: #dbe4df;
  --gf-filter-muted: #60716c;
}

.gf-filter-mobile-head { display: none; }

.gf-filter-label--sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.gf-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--gf-filter-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.gf-filter-toolbar__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
}

.gf-filter-toolbar fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.gf-filter-toolbar legend,
.gf-filter-control > span,
.gf-filter-sort__head > label {
  display: block;
  margin-bottom: 8px;
  color: var(--gf-filter-ink);
  font-family: Manrope, sans-serif;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gf-bedroom-options { display: flex; flex-wrap: wrap; gap: 7px; }
.gf-bedroom-options label { position: relative; }
.gf-bedroom-options input { position: absolute; opacity: 0; pointer-events: none; }
.gf-bedroom-options span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border: 1px solid var(--gf-filter-line);
  border-radius: 4px;
  color: var(--gf-filter-ink);
  background: #fff;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.gf-bedroom-options input:checked + span {
  border-color: var(--gf-filter-green);
  color: #fff;
  background: var(--gf-filter-green);
  font-weight: 700;
}

.gf-bedroom-options input:focus-visible + span { outline: 3px solid rgba(47, 118, 88, 0.24); outline-offset: 2px; }
.gf-bedroom-options label.is-disabled span { color: #9aa7a2; background: #f5f7f6; cursor: not-allowed; }
.gf-bedroom-options small {
  color: currentColor;
  font-size: 13px;
  font-weight: 550;
  opacity: 0.78;
}

.gf-filter-select {
  min-width: 158px;
  min-height: 40px;
  padding: 7px 34px 7px 11px;
  border: 1px solid var(--gf-filter-line);
  border-radius: 4px;
  color: var(--gf-filter-ink);
  background: #fff;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.gf-filter-sort { align-self: end; }
.gf-filter-sort .gf-filter-select { min-width: 174px; }
.gf-filter-sort__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.gf-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: var(--gf-filter-green);
  background: transparent;
  font-family: Manrope, sans-serif;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.gf-filter-clear span { color: var(--gf-filter-ink); font-size: 16px; line-height: 1; }
.gf-filter-clear:hover { color: var(--gf-filter-ink); }
.gf-filter-clear:focus-visible { outline: 3px solid rgba(47, 118, 88, 0.24); outline-offset: 3px; }
.gf-filter-clear--inline {
  min-height: 40px;
  align-self: flex-end;
  margin: 0;
  padding-inline: 4px;
}

.gf-active-filters {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.gf-active-filters[hidden] { display: none !important; }
.gf-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-filter-chips button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 12px;
  border: 1px solid rgba(47, 118, 88, 0.3);
  border-radius: 999px;
  color: var(--gf-filter-ink);
  background: var(--gf-filter-green-soft);
  font: 700 0.69rem/1.2 Manrope, sans-serif;
  cursor: pointer;
}

.gf-filter-chips b { color: var(--gf-filter-green); font-size: 1rem; line-height: 1; }
.gf-filter-results-meta {
  margin: 0 0 14px;
  color: var(--gf-filter-muted);
  font: 600 0.75rem/1.4 Manrope, sans-serif;
}

.gf-filter-results-meta strong { color: var(--gf-filter-ink); }
.gf-collection-filter [data-design-grid] { transition: opacity 150ms ease; }
.gf-collection-filter.is-filtering [data-design-grid] { opacity: 0.38; }

/* Preserve the approved Collection filter hierarchy when the later-loaded
   Granny Flats parity layer applies minimum control and small-text sizes. */
html body.granny-page.designs-page main .gf-collection-filter .gf-filter-select {
  font-size: 15px !important;
  font-weight: 600 !important;
}
html body.granny-page.designs-page main .gf-collection-filter .gf-bedroom-options small {
  font-size: 13px !important;
  font-weight: 550 !important;
}
html body.granny-page.designs-page main .gf-collection-filter .gf-filter-clear {
  font-size: 12px !important;
  font-weight: 750 !important;
}

.gf-collection-filter .gf-filter-empty {
  margin: 8px 0 0;
  padding: 42px 24px;
  border: 1px dashed #afbeb7;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
}

.gf-filter-empty[hidden] { display: none !important; }
.gf-filter-empty strong { display: block; margin-bottom: 9px; color: var(--gf-filter-ink); font: 800 1rem/1.35 Manrope, sans-serif; }
.gf-filter-empty p { max-width: 520px; margin: 0 auto 18px; color: var(--gf-filter-muted); font: 500 0.8rem/1.6 Manrope, sans-serif; }
.gf-filter-empty__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.gf-filter-empty__actions button,
.gf-filter-empty__actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--gf-filter-green);
  border-radius: 4px;
  color: #fff;
  background: var(--gf-filter-green);
  font: 800 0.68rem/1.2 Manrope, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.gf-filter-empty__actions a { color: var(--gf-filter-ink); background: #fff; border-color: var(--gf-filter-line); }
.gf-filter-sheet__head,
.gf-filter-mobile-actions { display: none; }
.gf-filter-overlay[hidden] { display: none !important; }

@media (min-width: 1340px) {
  .gf-collection-filter .od-design-grid,
  .gf-collection-filter .dc-design-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) and (min-width: 769px) {
  .gf-filter-toolbar { grid-template-columns: 1fr; }
  .gf-filter-sort { justify-self: start; }
}

@media (max-width: 768px) {
  .gf-filter-clear--inline { display: none; }
  .gf-filter-mobile-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .gf-filter-mobile-head > button,
  .gf-filter-mobile-head > label {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid var(--gf-filter-line);
    border-radius: 4px;
    color: var(--gf-filter-ink);
    background: #fff;
    font: 800 0.7rem/1.2 Manrope, sans-serif;
  }
  .gf-filter-mobile-head select { max-width: 80px; border: 0; color: inherit; background: transparent; font: inherit; }
  .gf-filter-sheet {
    position: fixed;
    z-index: 1801;
    inset: auto 0 0;
    max-height: min(92vh, 760px);
    overflow-y: auto;
    padding: 0 20px;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -20px 48px rgba(10, 37, 30, 0.2);
    transform: translateY(105%);
    transition: transform 220ms ease;
  }
  .gf-filter-sheet.is-open { transform: translateY(0); }
  .gf-filter-sheet__head {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    border-bottom: 1px solid var(--gf-filter-line);
    background: #fff;
  }
  .gf-filter-sheet__head strong { color: var(--gf-filter-ink); font: 800 1rem/1.2 Manrope, sans-serif; }
  .gf-filter-sheet__head button { width: 42px; height: 42px; border: 0; color: var(--gf-filter-ink); background: transparent; font-size: 1.55rem; }
  .gf-filter-toolbar { display: block; margin: 0; padding: 22px 0 12px; border: 0; background: #fff; }
  .gf-filter-toolbar__primary { display: grid; gap: 24px; }
  .gf-bedroom-options { display: grid; grid-template-columns: 1fr 1fr; }
  .gf-bedroom-options span { width: 100%; justify-content: space-between; }
  .gf-filter-control .gf-filter-select { width: 100%; min-height: 46px; }
  .gf-filter-sort { display: none; }
  .gf-filter-mobile-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 10px;
    margin-inline: -20px;
    padding: 14px 20px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gf-filter-line);
    background: #fff;
  }
  .gf-filter-mobile-actions button { min-height: 48px; border-radius: 4px; font: 800 0.7rem/1.2 Manrope, sans-serif; }
  .gf-filter-mobile-actions [data-reset] { border: 1px solid var(--gf-filter-line); color: var(--gf-filter-ink); background: #fff; }
  .gf-filter-mobile-actions [data-apply] { border: 1px solid var(--gf-filter-green); color: #fff; background: var(--gf-filter-green); }
  .gf-filter-overlay { position: fixed; z-index: 1800; inset: 0; background: rgba(10, 37, 30, 0.58); }
  .gf-filter-sheet-open { overflow: hidden; }
  .gf-active-filters { align-items: flex-start; }
}

@media (max-width: 480px) {
  .gf-bedroom-options { grid-template-columns: 1fr; }
  .gf-active-filters { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .gf-collection-filter [data-design-grid],
  .gf-filter-sheet { transition: none; }
}
