/* ══════════════════════════════════════════
   ElektroGH.wien – Category Page Styles
   ══════════════════════════════════════════ */

.category-hero {
  background: var(--black);
  padding: 48px 0;
  margin-bottom: 0;
}
.category-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.category-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.category-hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
}

/* ──────────── TOOLBAR ──────────── */
.listing-toolbar {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
}
.listing-toolbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.toolbar-left {
  font-size: 0.85rem;
  color: var(--muted);
}
.toolbar-left strong { color: var(--black); }
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toolbar-sort {
  height: 38px;
  padding: 0 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.83rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.toolbar-sort:focus { border-color: var(--yellow); }
.toolbar-view {
  display: flex;
  gap: 4px;
}
.view-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}
.view-btn.active, .view-btn:hover {
  background: var(--yellow-light);
  border-color: var(--yellow);
  color: var(--black);
}
.view-btn .lucide { width: 18px; height: 18px; }

/* ──────────── LAYOUT ──────────── */
.listing-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}

/* ──────────── SIDEBAR FILTERS ──────────── */
.filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.filter-block {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.filter-block-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-block-title .lucide { width: 16px; height: 16px; color: var(--muted); }
.filter-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.filter-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}
.filter-list li:hover { color: var(--black); }
.filter-list input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--yellow);
  cursor: pointer;
}
.filter-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted-light);
  font-family: 'DM Mono', monospace;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.price-input {
  flex: 1;
  min-width: 0;
  width: 0;
  height: 36px;
  padding: 0 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text);
  outline: none;
  text-align: center;
  -moz-appearance: textfield;
}
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.price-input:focus { border-color: var(--yellow); }
.price-sep { color: var(--muted-light); font-size: 0.85rem; }

.filter-avail label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.btn-filter-apply {
  width: 100%;
  height: 40px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.btn-filter-apply:hover { background: var(--yellow-hover); }

/* ──────────── MOBILE FILTER HEADER ──────────── */
.filter-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.filter-mobile-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--black);
}
.filter-close-btn {
  width: 36px; height: 36px;
  border: none;
  background: var(--surface);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.filter-close-btn .lucide { width: 20px; height: 20px; }

/* ──────────── LISTING GRID ──────────── */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.listing-grid.list-view {
  grid-template-columns: 1fr;
}
.listing-grid.list-view .product-card {
  flex-direction: row;
}
.listing-grid.list-view .product-img {
  width: 160px;
  height: auto;
  min-height: 120px;
  flex-shrink: 0;
}

/* ──────────── PAGINATION ──────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.page-btn {
  width: 40px; height: 40px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
}
.page-btn:hover { border-color: var(--yellow); background: var(--yellow-light); }
.page-btn.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
  font-weight: 700;
}
.page-btn .lucide { width: 16px; height: 16px; }

/* ──────────── MOBILE FILTER ──────────── */
.filter-toggle-btn {
  display: none;
  height: 38px;
  padding: 0 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  gap: 6px;
}
.filter-toggle-btn .lucide { width: 16px; height: 16px; }
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  background: var(--yellow); color: var(--black);
  border-radius: 50%; font-size: 0.68rem; font-weight: 700;
  margin-left: 4px; padding: 0 4px;
}

@media (max-width: 900px) {
  .listing-layout { grid-template-columns: 1fr; gap: 16px; }
  .filter-sidebar { display: none; }
  .filter-sidebar.show {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--white);
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .filter-mobile-header { display: flex; }
  .filter-toggle-btn { display: flex; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-toolbar-inner { padding: 0 16px; flex-wrap: wrap; gap: 10px; }
  .toolbar-right { flex-wrap: wrap; }
  .toolbar-view { display: none; }
}

@media (max-width: 480px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .listing-grid.list-view .product-card { flex-direction: column; }
  .listing-grid.list-view .product-img { width: 100%; height: 120px; }
  .listing-layout { padding: 12px; }
  .category-hero { padding: 28px 0; }
  .category-hero-inner { padding: 0 16px; }
  .category-hero h1 { font-size: 1.3rem; }
  .category-hero p { font-size: 0.85rem; }
  .pagination { gap: 4px; margin-top: 24px; }
  .page-btn { width: 36px; height: 36px; font-size: 0.8rem; }
}
