/* ===== Catalog redesign: filter + quick links (gerbitsidy) ===== */
:root {
  --green: #0e6831;
  --green-600: #2e7d32;
  --green-700: #1b5e20;
  --green-050: #e8f5e9;
  --green-tint: #f2f8f3;
  --ink: #1e1e1e;
  --ink-60: #5d625e;
  --ink-40: #8c918d;
  --line: #e7eae7;
  --line-2: #eff1ef;
  --surface: #fff;
  --bg: #f5f7f5;
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 40, 24, 0.04), 0 1px 1px rgba(16, 40, 24, 0.06);
  --shadow-2: 0 6px 24px rgba(14, 104, 49, 0.1);
  --focus: 0 0 0 3px rgba(46, 125, 50, 0.28);
}

/* --- Catalog layout (fix sidebar + content row) --- */
.catalog {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start !important;
  gap: 28px;
}

.catalog .aside {
  width: 288px;
  flex: 0 0 288px;
  max-width: 288px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  z-index: 5;
}

.catalog-content {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 0 !important;
  align-self: flex-start;
}

/* --- Filter card --- */
.filter-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  box-sizing: border-box;
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px 14px;
}

.filter-head__title {
  font-family: Oswald, sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 9px;
}

.filter-head__title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.aside .aside__title {
  display: none;
}

.filter-count {
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  background: var(--green);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--pill);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.filter-count.show {
  display: inline-flex;
}

.active-bar {
  display: none;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line-2);
}

.active-bar.show {
  display: flex;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--green-050);
  color: var(--green-700);
  border: 1px solid #cde7d2;
  padding: 5px 8px 5px 11px;
  border-radius: var(--pill);
  cursor: pointer;
  transition: 0.15s;
  font-family: "Open Sans", sans-serif;
}

.active-chip:hover {
  background: #ddefe0;
}

.active-chip svg {
  width: 12px;
  height: 12px;
}

.active-reset {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-40);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 2px;
  font-family: "Open Sans", sans-serif;
}

.active-reset:hover {
  color: var(--green);
}

.catalog .frow {
  border-top: 1px solid var(--line-2);
  margin-bottom: 0;
}

.catalog .frow:first-of-type {
  border-top: none;
}

.frow__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 15px 20px;
  font-family: Oswald, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 0;
}

.frow__head:hover {
  color: var(--green);
}

.frow__head .chev {
  width: 18px;
  height: 18px;
  color: var(--ink-40);
  transition: transform 0.22s ease;
  flex: 0 0 auto;
}

.frow.collapsed .chev {
  transform: rotate(-90deg);
}

.frow__body {
  padding: 0 20px 8px;
}

.frow.collapsed .frow__body,
.frow__body.collapsed {
  display: none;
}

.fsearch {
  position: relative;
  margin: 2px 0 12px;
}

.fsearch svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-40);
  pointer-events: none;
}

.fsearch input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 0 12px 0 34px;
  font-size: 13.5px;
  font-family: "Open Sans", sans-serif;
  color: var(--ink);
  outline: none;
  transition: 0.15s;
  box-sizing: border-box;
}

.fsearch input:focus {
  border-color: var(--green-600);
  background: #fff;
  box-shadow: var(--focus);
}

.catalog .opts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.catalog .aside-checkbox.is-collapsed {
  display: none;
}

.catalog .aside-checkbox.is-hidden {
  display: none;
}

.opts-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-family: "Open Sans", sans-serif;
}

.opts-more:hover {
  color: var(--green-700);
}

.opts-more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.opts-more.open svg {
  transform: rotate(180deg);
}

.opts-empty {
  display: none;
  font-size: 13px;
  color: var(--ink-40);
  padding: 6px 10px 4px;
}

.opts-empty.show {
  display: block;
}

.filter-foot {
  position: sticky;
  bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 22%);
  border-top: 1px solid var(--line-2);
}

.btn-apply {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--green);
  color: #fff;
  font-family: Oswald, sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.18s;
  box-shadow: 0 6px 16px rgba(14, 104, 49, 0.22);
}

.btn-apply:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(14, 104, 49, 0.28);
}

.btn-apply b {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
}

/* --- Quick links tabs --- */
.custom-tags-new.qsel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 16px 20px 18px;
  margin-bottom: 26px;
  overflow: hidden;
  box-sizing: border-box;
}

.custom-tags-new .tg-section,
.custom-tags-new .tg-label {
  display: none;
}

.qtab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.qsel__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.qtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 9px;
  font-family: Oswald, sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-60);
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
  line-height: 1;
  min-height: 44px;
  box-sizing: border-box;
}

.qtab:hover {
  color: var(--green-700);
}

.qtab__n {
  font-family: "Open Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
  transition: 0.15s;
}

.qsel__panels {
  padding-top: 15px;
}

.qpanel {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  animation: qsel-fade 0.2s ease;
}

@keyframes qsel-fade {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#qt0:checked ~ .qsel__tabs label[for="qt0"],
#qt1:checked ~ .qsel__tabs label[for="qt1"],
#qt2:checked ~ .qsel__tabs label[for="qt2"],
#qt3:checked ~ .qsel__tabs label[for="qt3"] {
  background: #fff;
  color: var(--green-700);
  box-shadow: var(--shadow-1);
}

#qt0:checked ~ .qsel__tabs label[for="qt0"] .qtab__n,
#qt1:checked ~ .qsel__tabs label[for="qt1"] .qtab__n,
#qt2:checked ~ .qsel__tabs label[for="qt2"] .qtab__n,
#qt3:checked ~ .qsel__tabs label[for="qt3"] .qtab__n {
  color: var(--green-600);
}

#qt0:focus-visible ~ .qsel__tabs label[for="qt0"],
#qt1:focus-visible ~ .qsel__tabs label[for="qt1"],
#qt2:focus-visible ~ .qsel__tabs label[for="qt2"],
#qt3:focus-visible ~ .qsel__tabs label[for="qt3"] {
  box-shadow: var(--focus);
}

#qt0:checked ~ .qsel__panels .qpanel[data-p="0"],
#qt1:checked ~ .qsel__panels .qpanel[data-p="1"],
#qt2:checked ~ .qsel__panels .qpanel[data-p="2"],
#qt3:checked ~ .qsel__panels .qpanel[data-p="3"] {
  display: flex;
}

.qtab--star {
  color: var(--green-700);
}

.qtab--star svg {
  width: 14px;
  height: 14px;
  margin-right: -1px;
}

.custom-tags-new .tb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--pill);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  min-height: 44px;
  box-sizing: border-box;
}

.custom-tags-new .tb:hover {
  border-color: var(--green-600);
  color: var(--green-700);
  background: var(--green-tint);
  transform: translateY(-1px);
}

.custom-tags-new .tb.on,
.custom-tags-new .tb.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: var(--shadow-2);
}

.tb--preset {
  background: var(--green-050);
  border-color: #cde7d2;
  color: var(--green-700);
  font-weight: 600;
  padding-left: 11px;
}

.tb--preset svg {
  width: 14px;
  height: 14px;
  color: var(--green-600);
  flex: 0 0 auto;
}

.tb--preset:hover {
  background: #dbeedf;
  border-color: var(--green-600);
  color: var(--green-700);
}

/* Mobile filter drawer */
@media (max-width: 860px) {
  .catalog .aside {
    position: fixed;
    inset: 0;
    z-index: 60;
    top: 0;
    width: auto;
    background: rgba(20, 30, 22, 0.45);
    display: none;
    padding: 0;
  }

  .catalog .aside.open {
    display: block;
  }

  .catalog .filter-card {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(380px, 86vw);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    animation: filter-slidein 0.22s ease;
  }

  @keyframes filter-slidein {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }

  .catalog .frow-scroll {
    flex: 1;
    overflow: auto;
  }

  .mob-filter {
    min-height: 44px;
  }
}
