/* ===================================================================
   Products listing page – filters sidebar + 4-col grid
   =================================================================== */

/* breadcrumbs */
.products-breadcrumb {
  font-size: 14px;
  color: var(--color-gray-400);
  padding-top: 24px;
  padding-bottom: 8px;
}
.products-breadcrumb a {
  color: var(--color-gray-400);
  text-decoration: none;
}
.products-breadcrumb a:hover {
  text-decoration: underline;
}
.products-breadcrumb__current {
  color: var(--color-text);
  font-weight: 500;
}

/* layout: sidebar + grid */
.products-layout {
  display: flex;
  gap: 32px;
  padding-top: 8px;
  padding-bottom: 64px;
  align-items: start;
}

/* ---------- Filters sidebar ---------- */
.products-filters {
  position: sticky;
  top: 100px;
  background: var(--color-gray-100);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  display: none !important; /* TEMP DISABLE */
}
.products-filters__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.products-filters__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.products-filters__clear {
  background: none;
  border: none;
  color: var(--color-green);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.products-filters__clear:hover {
  text-decoration: underline;
}

/* filter groups */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-group__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.filter-group__input,
.filter-group__select {
  height: 40px;
  border: 1px solid var(--color-gray-150);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.filter-group__input:focus,
.filter-group__select:focus {
  border-color: var(--color-green);
}
.filter-group__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.filter-group__loading {
  font-size: 13px;
  color: var(--color-gray-400);
}
/* checkbox row */
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.filter-check input[type="checkbox"] {
  accent-color: var(--color-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ---------- main content area ---------- */
.products-main {
  min-width: 0; /* prevent grid blowout */
}
.products-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.products-topbar__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}
.products-topbar__filter-toggle {
  display: none; /* shown on mobile */
  align-items: center;
  gap: 6px;
  background: var(--color-gray-100);
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* footer / load-more */
.products-footer {
  text-align: center;
  padding-top: 32px;
}
.products-footer__more {
  min-width: 200px;
}

/* ---------- mobile overlay for filters ---------- */
.products-filters__close {
  display: none;
}

/* ===================================================================
   Responsive (≤ 992px)
   =================================================================== */
@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* filters as slide-in overlay on mobile */
  .products-filters {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    border-radius: 0;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
    padding-top: 20px;
  }
  .products-filters.open {
    transform: translateX(0);
  }
  .products-filters__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-left: auto;
  }
  .products-filters__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 899;
  }
  .products-filters__backdrop.open {
    display: block;
  }

  .products-topbar__filter-toggle {
    display: flex;
  }
}
