/* Powertech Trading — Category listing page */

.pt-page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--primary-grad-hero);
  padding: clamp(2.2rem, 4vw, 3.4rem) 0;
}
.pt-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 280px at 90% 20%, rgba(61, 155, 106, 0.35), transparent 60%),
    radial-gradient(500px 240px at 10% 100%, rgba(0, 112, 68, 0.4), transparent 55%);
  pointer-events: none;
}
.pt-page-hero .pt-wrap { position: relative; z-index: 1; }
.pt-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.85rem;
}
.pt-breadcrumb a:hover { color: #fff; }
.pt-breadcrumb .sep { opacity: 0.45; }
.pt-page-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
}
.pt-page-hero .lead {
  margin: 0;
  max-width: 54ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.pt-listing {
  padding: clamp(1.8rem, 3.5vw, 2.8rem) 0 3.5rem;
  background: #f8f9f8;
}
.pt-listing-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* Sidebar */
.pt-filters {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 6.5rem;
}
.pt-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.pt-filters-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.pt-filters-clear {
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.pt-filters-clear:hover { text-decoration: underline; }

.pt-filter-block {
  margin-bottom: 1.25rem;
}
.pt-filter-block:last-child { margin-bottom: 0; }
.pt-filter-block h3 {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}
.pt-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pt-filter-list a,
.pt-filter-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.52rem 0.65rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.pt-filter-list a:hover,
.pt-filter-check:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.pt-filter-list a.is-active {
  background: var(--primary-soft);
  border-color: #b7dcc9;
  color: var(--primary);
}
.pt-filter-list .count {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
  background: var(--light);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.pt-filter-check {
  width: 100%;
  background: none;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
}
.pt-filter-check input {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
}
.pt-filter-check span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pt-price-range {
  display: grid;
  gap: 0.55rem;
}
.pt-price-range input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}
.pt-price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

/* Toolbar */
.pt-listing-main {
  min-width: 0;
}
.pt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.pt-toolbar-meta {
  font-size: 0.9rem;
  color: var(--muted);
}
.pt-toolbar-meta strong {
  color: var(--ink);
  font-weight: 750;
}
.pt-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.pt-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem 0.35rem 0.9rem;
}
.pt-sort label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.pt-sort select {
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  padding: 0.25rem 0.1rem;
}
.pt-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.pt-filter-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 4-column product grid */
.pt-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.pt-listing-grid .pt-product.is-hidden {
  display: none;
}
.pt-listing-grid .pt-product.is-reveal {
  animation: pt-card-in 0.4s ease both;
}
@keyframes pt-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pt-listing-grid .pt-product {
  background: #fff;
}
.pt-listing-grid .pt-product h3 {
  font-size: 0.9rem;
  min-height: 2.6em;
}

/* Load more */
.pt-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.8rem;
  padding-top: 0.4rem;
}
.pt-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: var(--primary-grad);
  color: #fff;
  font-weight: 750;
  font-size: 0.92rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 81, 46, 0.22);
  transition: transform .2s, filter .2s, box-shadow .2s;
}
.pt-load-more:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  color: #fff;
}
.pt-load-more:disabled,
.pt-load-more.is-done {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.pt-load-status {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

/* Empty / chips */
.pt-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.pt-chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid #b7dcc9;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.pt-chip-filter button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Mobile filter drawer */
.pt-filters-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 18, 0.45);
  z-index: 1085;
}
.pt-filters-backdrop.is-on { display: block; }

@media (max-width: 1366px) {
  .pt-listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
  .pt-listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .pt-listing-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .pt-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .pt-listing-layout { grid-template-columns: 1fr; }
  .pt-filter-toggle { display: inline-flex; }
  .pt-filters {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(340px, 88vw);
    z-index: 1090;
    border-radius: 0;
    overflow: auto;
    transform: translateX(-105%);
    transition: transform .28s ease;
    max-height: 100vh;
  }
  [dir="rtl"] .pt-filters {
    left: auto;
    right: 0;
    transform: translateX(105%);
  }
  .pt-filters.is-open,
  [dir="rtl"] .pt-filters.is-open {
    transform: none;
  }
  .pt-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .pt-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .pt-toolbar { padding: 0.75rem; }
  .pt-listing-grid .pt-product { padding: 0.65rem; }
  .pt-listing-grid .pt-product h3 { font-size: 0.8rem; min-height: 2.4em; }
}

@media (max-width: 420px) {
  .pt-listing-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-listing-grid .pt-product.is-reveal { animation: none; }
}
