/* Herbawell — listing (katalog / archiwum kategorii). Wartości 1:1 z makietą Premium (widok „Listing").
   Zasady styleguide: zero zaokrągleń/cieni, podział linią 1px var(--hw-line), mikroetykiety 10px/700/.12em caps. */

.hw-listing { background: var(--hw-bone); }

/* ---------- Breadcrumb ---------- */
.hw-listing__crumbs {
  padding: 26px 56px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}
.hw-listing__crumbs a { cursor: pointer; }
.hw-listing__crumbs a:hover { color: var(--hw-green); }
.hw-listing__crumb-sep { padding: 0 4px; }
.hw-listing__crumb-current { color: var(--hw-green); }

/* ---------- Nagłówek widoku ---------- */
.hw-listing__head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
  padding: 40px 56px 44px;
  border-bottom: 1px solid var(--hw-line);
}
.hw-listing__head-main { display: flex; flex-direction: column; gap: 18px; }
.hw-listing__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-listing__title {
  margin: 0;
  font-family: var(--hw-font);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--hw-green);
  line-height: .98;
}
.hw-listing__intro {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--hw-text-soft);
}

/* ---------- Układ: sidebar + main ---------- */
.hw-listing__body {
  display: grid;
  grid-template-columns: 268px 1fr;
}

/* ---------- Sidebar / filtry ---------- */
.hw-listing__sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 36px 32px;
  border-right: 1px solid var(--hw-line);
}
.hw-filter { display: flex; flex-direction: column; gap: 14px; }
.hw-filter + .hw-filter { padding-top: 26px; border-top: 1px solid var(--hw-line); }
.hw-filter__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hw-green);
}
.hw-filter__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hw-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hw-green);
  border: 1px solid rgba(16, 38, 28, .2);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.hw-chip:hover { border-color: var(--hw-brass); }
.hw-chip.is-active { border-color: var(--hw-brass); background: #EFE8DB; }
.hw-chip__dot { width: 9px; height: 9px; border-radius: 999px; }
.hw-filter__check {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  color: var(--hw-text);
  cursor: pointer;
}
.hw-box { width: 15px; height: 15px; border: 1px solid var(--hw-line-strong); background: transparent; flex: none; }
.hw-box.is-on { border-color: var(--hw-green); background: var(--hw-green); }
.hw-filter__slider { position: relative; height: 1px; background: rgba(16, 38, 28, .2); margin: 8px 0; }
.hw-filter__slider-track { position: absolute; left: 8%; right: 26%; top: 0; height: 1px; background: var(--hw-brass); }
.hw-filter__slider-handle { position: absolute; top: -5px; width: 11px; height: 11px; background: var(--hw-green); }
.hw-filter__slider-vals { display: flex; justify-content: space-between; font-size: 12px; color: #7A8A7E; }

/* ---------- Main ---------- */
.hw-listing__main { min-width: 0; }

/* Toolbar */
.hw-listing__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 36px;
  border-bottom: 1px solid var(--hw-line);
}
.hw-listing__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hw-listing__count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}
.hw-tag {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid rgba(16, 38, 28, .2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--hw-green);
  cursor: pointer;
}
.hw-tag:hover { border-color: var(--hw-brass); }
.hw-tag__x { color: var(--hw-text-muted); }

/* Sort select — makieta: „Sortuj: {label} ▾" wersalikami */
.hw-sort { display: flex; align-items: center; gap: 10px; margin: 0; }
.hw-sort__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-green);
}
.hw-sort__select { position: relative; display: inline-flex; align-items: center; }
.hw-sort__select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 26px 0 0;
  border: 0;
  background: transparent;
  font-family: var(--hw-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-green);
  cursor: pointer;
}
.hw-sort__select select:focus-visible { outline: 1px solid var(--hw-brass); outline-offset: 3px; }
.hw-sort__caret { position: absolute; right: 6px; pointer-events: none; font-size: 10px; color: var(--hw-green); }
.hw-sort__go {
  margin-left: 8px;
  padding: 6px 12px;
  border: 1px solid var(--hw-green);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-green);
  cursor: pointer;
}

/* Siatka kart: 3 kolumny desktop, gap 24px, padding 36px */
.hw-listing__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 36px;
}

/* Bundle CTA (zieleń) */
.hw-listing__bundle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 0 36px 44px;
  padding: 38px 40px;
  background: var(--hw-green);
}
.hw-listing__bundle-copy { display: flex; flex-direction: column; gap: 8px; }
.hw-listing__bundle-title { font-family: var(--hw-font); font-size: 30px; color: var(--hw-bone); line-height: 1.1; }
.hw-listing__bundle-note { font-size: 14px; color: #A9B8AC; }
.hw-listing__bundle .hw-btn--brass { padding: 17px 30px; height: auto; white-space: nowrap; }

/* Paginacja (styleguide — makieta jej nie ma) */
.hw-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  /* Dół 96px — oddech przed stopką jak w makiecie (zgłoszenie: paginacja zlewała się ze stopką). */
  margin: 0 36px 96px;
  border-top: 1px solid var(--hw-line);
}
.hw-pagination .hw-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border-right: 1px solid var(--hw-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hw-text-soft);
}
.hw-pagination a.hw-page:hover { color: var(--hw-green); background: var(--hw-bone-dark); }
.hw-pagination span.current.hw-page { color: var(--hw-green); border-bottom: 1px solid var(--hw-brass); }
.hw-pagination .hw-page.dots { color: var(--hw-text-muted); }

/* Stan pusty (pusta kategoria) */
.hw-listing__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 80px 36px;
  max-width: 560px;
}
.hw-listing__empty-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-listing__empty-text { margin: 0; font-size: 16px; line-height: 1.75; color: var(--hw-text-soft); }

/* ---------- Mobilny pasek filtrów + drawer (makieta Premium v2) ---------- */
/* Domyślnie ukryte na desktopie (sidebar żyje); pokazane ≤768. */
.hw-listing__mobbar { display: none; }
.hw-filterdrawer { display: none; }
.hw-filterdrawer[hidden] { display: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .hw-listing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .hw-listing__crumbs { padding: 18px 22px 0; font-size: 9px; letter-spacing: .1em; }
  .hw-listing__crumb-sep { padding: 0 3px; }

  .hw-listing__head {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 22px 26px;
  }
  .hw-listing__eyebrow { font-size: 9.5px; letter-spacing: .13em; }
  .hw-listing__title { font-size: 40px; line-height: 1; }
  .hw-listing__intro { font-size: 14.5px; }

  /* Sidebar składany pod paskiem — na mobile chowamy panel filtrów (makieta: drawer). */
  .hw-listing__body { grid-template-columns: 1fr; }
  .hw-listing__sidebar { display: none; }

  /* Pasek „Filtry (N) | Sortuj ▾" nad siatką (makieta: 2 kolumny, linie 1px). */
  .hw-listing__mobbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--hw-line);
  }
  .hw-listing__mobbtn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 0;
    background: transparent;
    font-family: var(--hw-font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--hw-green);
    cursor: pointer;
  }
  .hw-listing__mobbtn--filter { border-right: 1px solid var(--hw-line); }
  .hw-listing__mobsort-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: 0;
    cursor: pointer;
  }

  /* Drawer filtrów — panel rozwijany (makieta: tło #EFEDE6). */
  .hw-filterdrawer {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 22px;
    background: var(--hw-bone-dark);
    border-bottom: 1px solid var(--hw-line);
  }
  .hw-filterdrawer[hidden] { display: none; }
  .hw-filterdrawer__head { display: flex; align-items: center; justify-content: space-between; }
  .hw-filterdrawer__title { font-family: var(--hw-font); font-size: 24px; color: var(--hw-green); }
  .hw-filterdrawer__close { border: 0; background: transparent; font-size: 15px; color: var(--hw-text-muted); cursor: pointer; }
  .hw-filterdrawer__group { display: flex; flex-direction: column; gap: 12px; }
  .hw-filterdrawer__apply {
    display: flex; align-items: center; justify-content: center;
    padding: 0 16px; height: 52px;
    border: 1px solid rgba(16, 38, 28, .3);
    font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--hw-green); text-decoration: none;
  }
  .hw-filterdrawer__apply[hidden] { display: none; }
  .hw-filterdrawer__show {
    padding: 16px;
    border: 1px solid var(--hw-green);
    background: var(--hw-green);
    color: var(--hw-bone);
    font-family: var(--hw-font);
    font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    cursor: pointer;
  }

  /* Sort w toolbarze zbędny na mobile (jest w pasku); zostają tagi/licznik. */
  .hw-listing__toolbar { padding: 16px 22px; gap: 12px; }
  .hw-listing__toolbar .hw-sort { display: none; }
  .hw-listing__count { font-size: 10px; }
  .hw-sort__label { font-size: 10px; }

  .hw-listing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 22px; } /* minmax(0,1fr): 1fr z min-width:auto pozwalał treści kart rozpychać siatkę ponad viewport (390px) */

  .hw-listing__bundle {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 0 22px 40px;
    padding: 28px 24px;
  }
  .hw-listing__bundle-title { font-size: 26px; }
  .hw-listing__bundle-note { font-size: 13.5px; }
  .hw-listing__bundle .hw-btn--brass { padding: 16px; text-align: center; justify-content: center; }

  .hw-pagination { margin: 0 22px 72px; }
  .hw-listing__empty { padding: 56px 22px; }
}

/* „Wyczyść wszystkie filtry" — secondary wg styleguide; is-idle (brak aktywnych filtrów) = przygaszony. */
.hw-filter__clear {
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px; padding: 0 16px; height: 52px;
  border: 1px solid rgba(16, 38, 28, .3);
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--hw-green); text-decoration: none; transition: border-color .15s ease;
}
.hw-filter__clear:hover { border-color: var(--hw-brass); }
.hw-filter__clear.is-idle { opacity: .45; pointer-events: none; }

/* ---------- Blok SEO na dole listingu (pozostałe akapity opisu kategorii) ---------- */
/* Górny separator 1px jak inne podziały motywu; przygaszony, drobny druk. */
.hw-listing__seotext {
  max-width: 72ch;
  margin: 46px 36px 0;
  padding-top: 30px;
  padding-bottom: 44px;
  border-top: 1px solid var(--hw-line);
}
.hw-listing__seotext p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--hw-text-soft);
}
.hw-listing__seotext p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .hw-listing__seotext { margin: 40px 22px 0; }
}
