/* ═══════════════════════════════════════════
   COC Product Archive — product-archive.css
   Reuses .coc-psw-card / .coc-psw-* classes from
   product-showcase.css for the card itself, so
   both widgets' grids look identical.
   ═══════════════════════════════════════════ */

.coc-psa {
  --coc-psa-accent: #EF7170;
  --coc-psa-ink: #010101;
  --coc-psa-muted: #767676;
  --coc-psa-border: #E5E5E5;
  --coc-psa-bg: #FAFAFA;

  font-family: 'Poppins', inherit;
  position: relative;
}
.coc-psa * { box-sizing: border-box; }

/* ── Layout: Sidebar ── */
.coc-psa-layout-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.coc-psa-layout-sidebar .coc-psa-sidebar {
  position: sticky;
  top: 20px;
}

/* ── Layout: Top bar ── */
.coc-psa-layout-topbar { display: block; }
.coc-psa-layout-topbar .coc-psa-topbar {
  margin-bottom: 24px;
}
.coc-psa-layout-topbar .coc-psa-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.coc-psa-layout-topbar .coc-psa-filter-group { flex: 0 0 auto; margin-bottom: 0; min-width: 160px; }
.coc-psa-layout-topbar .coc-psa-filters-head { flex-basis: 100%; }

/* ── Filters panel ── */
.coc-psa-filters {
  padding: 20px;
  background: var(--coc-psa-bg);
  border-radius: 14px;
}
.coc-psa-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.coc-psa-filters-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--coc-psa-ink);
}
.coc-psa-filters-clear {
  border: none;
  background: none;
  color: var(--coc-psa-accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.coc-psa-filters-clear:hover { text-decoration: underline; }

.coc-psa-filter-group { margin-bottom: 22px; }
.coc-psa-filter-group:last-child { margin-bottom: 0; }
.coc-psa-filter-group h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--coc-psa-ink);
}

.coc-psa-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 13px;
  color: var(--coc-psa-muted);
  cursor: pointer;
}
.coc-psa-check input[type="checkbox"],
.coc-psa-check input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--coc-psa-accent);
  cursor: pointer;
  flex-shrink: 0;
}
.coc-psa-check span { flex: 1; }
.coc-psa-check em { font-style: normal; font-size: 11px; color: #A3A3A3; }

.coc-psa-rating-check .coc-psa-stars-mini { color: #FBBF24; letter-spacing: 1px; font-size: 13px; }
.coc-psa-rating-reset {
  border: none; background: none; color: var(--coc-psa-accent);
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 0; margin-top: 2px;
}

/* ── Price range dual slider ── */
.coc-psa-price-slider { position: relative; height: 20px; margin: 10px 2px 6px; }
.coc-psa-price-track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; background: var(--coc-psa-border); border-radius: 99px; transform: translateY(-50%); }
.coc-psa-price-range { position: absolute; height: 100%; background: var(--coc-psa-accent); border-radius: 99px; }
.coc-psa-price-input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: none;
  pointer-events: none;
  margin: 0;
}
.coc-psa-price-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--coc-psa-accent);
  box-shadow: 0 1px 4px rgba(1,1,1,.2);
  cursor: pointer;
}
.coc-psa-price-input::-moz-range-thumb {
  pointer-events: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--coc-psa-accent);
  box-shadow: 0 1px 4px rgba(1,1,1,.2);
  cursor: pointer;
}
.coc-psa-price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--coc-psa-ink);
}

/* ── Main content ── */
.coc-psa-main { min-width: 0; }

.coc-psa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.coc-psa-count { font-size: 13px; color: var(--coc-psa-muted); }
.coc-psa-sort-wrap { display: flex; align-items: center; gap: 8px; }
.coc-psa-sort-wrap label { font-size: 12.5px; color: var(--coc-psa-muted); white-space: nowrap; }
.coc-psa-sort-select {
  height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--coc-psa-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--coc-psa-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.coc-psa-sort-select:focus { outline: none; border-color: var(--coc-psa-accent); }

/* ── Grid (reuses .coc-psw-card from product-showcase.css) ── */
.coc-psa-grid {
  display: grid;
  grid-template-columns: repeat(var(--coc-cols-d, 4), 1fr);
  gap: 22px;
}
@media (max-width: 1024px) {
  .coc-psa-grid { grid-template-columns: repeat(var(--coc-cols-t, 3), 1fr); }
}
@media (max-width: 767px) {
  .coc-psa-grid { grid-template-columns: repeat(var(--coc-cols-m, 2), 1fr); gap: 14px; }
}

.coc-psa-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: #A3A3A3;
}
.coc-psa-empty p { margin: 0; font-size: 14px; color: var(--coc-psa-muted); max-width: 320px; }

/* ── Pagination ── */
.coc-psa-pagination-wrap { margin-top: 28px; }
.coc-psa-pagination { display: flex; justify-content: center; gap: 6px; }
.coc-psa-page-btn {
  min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--coc-psa-border);
  border-radius: 8px;
  background: #fff;
  color: var(--coc-psa-ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.coc-psa-page-btn:hover { border-color: var(--coc-psa-accent); color: var(--coc-psa-accent); }
.coc-psa-page-btn.active { background: var(--coc-psa-accent); border-color: var(--coc-psa-accent); color: #fff; }
.coc-psa-page-dots { display: flex; align-items: center; color: var(--coc-psa-muted); padding: 0 4px; }

.coc-psa-loadmore-wrap { display: flex; justify-content: center; }
.coc-psa-loadmore-btn {
  height: 46px; padding: 0 28px;
  border: 1.5px solid var(--coc-psa-ink);
  border-radius: 10px;
  background: #fff;
  color: var(--coc-psa-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.coc-psa-loadmore-btn:hover { background: var(--coc-psa-ink); color: #fff; }
.coc-psa-loadmore-btn.loading { opacity: .6; cursor: wait; }

/* ── Mobile filter trigger + drawer ── */
.coc-psa-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  margin-bottom: 16px;
  border: 1px solid var(--coc-psa-border);
  border-radius: 8px;
  background: #fff;
  color: var(--coc-psa-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.coc-psa-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(1,1,1,.45);
  z-index: 9998;
  opacity: 0;
  transition: opacity .25s ease;
}
.coc-psa-mobile-overlay.open { display: block; opacity: 1; }

@media (max-width: 900px) {
  .coc-psa-layout-sidebar { grid-template-columns: 1fr; }
  .coc-psa-layout-sidebar .coc-psa-sidebar,
  .coc-psa-layout-topbar .coc-psa-topbar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 86vw);
    z-index: 9999;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .coc-psa-layout-sidebar .coc-psa-sidebar.open,
  .coc-psa-layout-topbar .coc-psa-topbar.open {
    transform: translateX(0);
  }
  .coc-psa-layout-topbar .coc-psa-filters { flex-direction: column; }
  .coc-psa-layout-topbar .coc-psa-filter-group { min-width: 0; margin-bottom: 22px; }

  .coc-psa-mobile-filter-btn { display: inline-flex; }
}

@media (max-width: 480px) {
  .coc-psa-toolbar { flex-direction: column; align-items: stretch; }
  .coc-psa-sort-wrap { justify-content: space-between; }
  .coc-psa-sort-select { flex: 1; }
}
