/* ============================================================
   PRIMEVA LABS — PRODUCT CATALOG (woocommerce/archive-product.php)
   Scoped to #pv-catalog. Loaded on shop / category / tag archives.
   ============================================================ */

#pv-catalog, #pv-catalog * { box-sizing: border-box; }

#pv-catalog {
  --pv-navy: #061a44;
  --pv-navy-2: #0a245a;
  --pv-blue: #1377ff;
  --pv-blue-2: #19bdf2;
  --pv-ice: #f4faff;
  --pv-line: #dce8f7;
  --pv-muted: #607391;
  --pv-soft-shadow: 0 12px 34px rgba(6,26,68,.07);
  --pv-max: 1440px;

  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pv-navy);
  background:
    radial-gradient(circle at 10% 0%, rgba(19,119,255,.05), transparent 22%),
    linear-gradient(180deg, #ffffff, #f7fbff 60%, #ffffff);
  padding: 28px 0 64px;
}
#pv-catalog a { text-decoration: none; }
#pv-catalog button { font-family: inherit; cursor: pointer; }
#pv-catalog img { display: block; max-width: 100%; }

.pc-shell {
  width: min(var(--pv-max), calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ---------------- SIDEBAR ---------------- */
.pc-sidebar { position: sticky; top: 18px; display: grid; gap: 18px; }
.pc-side-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pv-navy);
}
.pc-side-head > span { display: inline-flex; align-items: center; gap: 9px; }
.pc-side-head svg { width: 16px; height: 16px; color: #5a7299; }
.pc-drawer-close { display: none; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--pv-muted); }

.pc-cats { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.pc-cats::-webkit-scrollbar { width: 6px; }
.pc-cats::-webkit-scrollbar-thumb { background: var(--pv-line); border-radius: 999px; }
.pc-cat {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px;
  width: 100%; text-align: left; border: 0; background: none; border-radius: 12px;
  padding: 10px 12px; color: var(--pv-navy); font-weight: 700; font-size: 14px; transition: background 140ms ease;
}
.pc-cat:hover { background: #f3f6fb; }
.pc-cat.is-active { background: var(--pv-navy); color: #fff; box-shadow: none; }
.pc-cat-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #eef2f7; color: #5a7299; }
.pc-cat-ic svg { width: 16px; height: 16px; }
.pc-cat.is-active .pc-cat-ic { background: rgba(255,255,255,.14); color: #fff; }
.pc-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cat-count { font-size: 12px; font-weight: 800; color: var(--pv-muted); }
.pc-cat.is-active .pc-cat-count { color: rgba(255,255,255,.8); }

.pc-side-block { border-top: 1px solid var(--pv-line); padding-top: 16px; }
.pc-side-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.pc-side-title > span { display: inline-flex; align-items: center; gap: 8px; }
.pc-side-title svg { width: 15px; height: 15px; color: #5a7299; }
.pc-fav-clear { border: 0; background: none; color: var(--pv-blue); font-size: 12px; font-weight: 800; }
.pc-fav-empty { color: var(--pv-muted); font-size: 13px; line-height: 1.45; margin: 0; }
.pc-fav-list { display: grid; gap: 8px; }
.pc-fav-row { display: grid; grid-template-columns: 40px 1fr 22px; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--pv-line); border-radius: 12px; background: #fff; }
.pc-fav-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.pc-fav-row .pc-fav-meta { min-width: 0; }
.pc-fav-row .pc-fav-nm { font-size: 13px; font-weight: 800; color: var(--pv-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-fav-row .pc-fav-st { font-size: 11px; color: var(--pv-muted); font-weight: 600; }
.pc-fav-row .pc-fav-rm { border: 0; background: none; color: #c64; font-size: 16px; line-height: 1; }
.pc-fav-row .pc-fav-rm svg { width: 16px; height: 16px; color: var(--pv-blue); }

.pc-support { background: linear-gradient(155deg, var(--pv-navy), #0d2c5c); color: #fff; border-radius: 18px; padding: 22px; }
.pc-support-title { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pc-support p { margin: 8px 0 14px; font-size: 13.5px; color: rgba(255,255,255,.78); line-height: 1.45; }
.pc-support ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.pc-support li { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }
.pc-support li svg { width: 16px; height: 16px; color: var(--pv-blue-2); flex: none; }
.pc-support-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 44px; border-radius: 999px; background: var(--pv-blue); color: #fff; font-weight: 800; font-size: 13.5px; }
.pc-support-btn svg { width: 16px; height: 16px; }
.pc-support-btn:hover { background: #fff; color: var(--pv-navy); }

/* ---------------- MAIN ---------------- */
.pc-head h1 { margin: 0; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.04em; color: var(--pv-navy); }
.pc-head p { margin: 8px 0 0; color: var(--pv-muted); font-size: 16px; }

.pc-toolbar { display: flex; gap: 14px; align-items: center; margin: 22px 0 16px; flex-wrap: wrap; }
.pc-search { position: relative; flex: 1; min-width: 240px; }
.pc-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--pv-muted); }
.pc-search input { width: 100%; height: 52px; border: 1px solid var(--pv-line); border-radius: 999px; padding: 0 20px 0 48px; font-size: 15px; font-family: inherit; background: #fff; outline: none; box-shadow: 0 8px 24px rgba(6,26,68,.05); }
.pc-search input:focus { border-color: var(--pv-blue); }
.pc-toolbar-right { display: flex; align-items: center; gap: 12px; }
.pc-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pv-muted); font-weight: 700; }
.pc-sort select { height: 46px; border: 1px solid var(--pv-line); border-radius: 12px; padding: 0 36px 0 14px; font-family: inherit; font-weight: 700; font-size: 14px; color: var(--pv-navy); background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23607391' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 13px center; -webkit-appearance: none; appearance: none; }
.pc-view { display: inline-flex; border: 1px solid var(--pv-line); border-radius: 12px; overflow: hidden; background: #fff; }
.pc-view button { width: 44px; height: 46px; border: 0; background: none; display: grid; place-items: center; color: var(--pv-muted); }
.pc-view button svg { width: 18px; height: 18px; }
.pc-view button.is-active { background: var(--pv-navy); color: #fff; }

.pc-trust { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; border: 1px solid var(--pv-line); border-radius: 16px; background: #fff; padding: 16px; box-shadow: var(--pv-soft-shadow); margin-bottom: 18px; }
.pc-trust-item { display: flex; align-items: center; gap: 11px; }
.pc-trust-item + .pc-trust-item { border-left: 1px solid var(--pv-line); padding-left: 12px; }
.pc-trust-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #eef5ff; color: var(--pv-blue); }
.pc-trust-ic svg { width: 19px; height: 19px; }
.pc-trust-item b { display: block; font-size: 13px; font-weight: 800; color: var(--pv-navy); line-height: 1.1; }
.pc-trust-item small { display: block; font-size: 11.5px; color: var(--pv-muted); font-weight: 600; margin-top: 2px; }

.pc-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pc-filter-pill { border: 1px solid var(--pv-line); background: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 800; font-size: 13px; color: var(--pv-navy); }
.pc-filter-pill.is-active { background: var(--pv-blue); border-color: var(--pv-blue); color: #fff; }
.pc-filter-select select { height: 40px; border: 1px solid var(--pv-line); border-radius: 999px; padding: 0 34px 0 16px; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--pv-navy); background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23607391' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; }
.pc-clear { margin-left: auto; border: 0; background: none; color: var(--pv-muted); font-weight: 700; font-size: 13px; text-decoration: underline; }
.pc-clear:hover { color: var(--pv-blue); }

.pc-results { color: var(--pv-muted); font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }

.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 20px; }

/* ---------------- CARD ---------------- */
.pc-card { display: flex; flex-direction: column; border: 1px solid var(--pv-line); border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 10px 28px rgba(6,26,68,.05); transition: transform 180ms ease, box-shadow 180ms ease; }
.pc-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(6,26,68,.12); }
.pc-card-media { position: relative; aspect-ratio: 1 / 1; background: #eef6ff; overflow: hidden; }
.pc-card-imglink { display: block; width: 100%; height: 100%; }
.pc-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-noimg { display: grid; place-items: center; height: 100%; color: var(--pv-muted); font-size: 13px; }
.pc-badge { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--pv-navy); color: #fff; border-radius: 999px; padding: 6px 11px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pc-fav { position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--pv-line); background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--pv-muted); transition: 140ms ease; }
.pc-fav svg { width: 18px; height: 18px; fill: none; }
.pc-fav:hover { color: var(--pv-blue); transform: scale(1.08); }
.pc-fav.is-fav { color: #fff; background: var(--pv-blue); border-color: var(--pv-blue); }
.pc-fav.is-fav svg { fill: #fff; }

.pc-card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.pc-cat { color: var(--pv-blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.pc-name { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.pc-name a { color: var(--pv-navy); }
.pc-name a:hover { color: var(--pv-blue); }
.pc-desc { margin: 7px 0 0; color: var(--pv-muted); font-size: 13px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pc-strengths { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.pc-chip { border: 1px solid var(--pv-line); background: #f4f9ff; color: var(--pv-navy); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.pc-chip-more { color: var(--pv-muted); }
.pc-foot { margin-top: 14px; }
.pc-price { color: var(--pv-navy); font-weight: 800; font-size: 18px; }
.pc-price .woocommerce-Price-amount { color: var(--pv-navy); }
.pc-price del { color: var(--pv-muted); font-weight: 600; font-size: 14px; margin-right: 6px; }
.pc-view { margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 999px; background: var(--pv-navy); color: #fff; font-weight: 800; font-size: 14px; }
.pc-view svg { width: 16px; height: 16px; }
.pc-view:hover { background: var(--pv-blue); }

.pc-empty { text-align: center; color: var(--pv-muted); font-size: 15px; padding: 40px 0; }
.pc-link { border: 0; background: none; color: var(--pv-blue); font-weight: 800; text-decoration: underline; }

/* ---------------- LIST VIEW ---------------- */
.pc-grid.is-list { grid-template-columns: 1fr; gap: 14px; }
.pc-grid.is-list .pc-card { flex-direction: row; }
.pc-grid.is-list .pc-card-media { width: 200px; flex: none; aspect-ratio: 1 / 1; }
.pc-grid.is-list .pc-card-body { flex: 1; }
.pc-grid.is-list .pc-desc { -webkit-line-clamp: 3; min-height: 0; }
.pc-grid.is-list .pc-view { align-self: flex-start; padding: 0 26px; }

/* ---------------- DRAWER (mobile) ---------------- */
.pc-drawer-toggle { display: none; }
.pc-drawer-backdrop { display: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1100px) {
  .pc-shell { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
  .pc-trust { grid-template-columns: repeat(3, 1fr); }
  .pc-trust-item:nth-child(4) { border-left: 0; padding-left: 0; }
}

@media (max-width: 980px) {
  #pv-catalog { padding-top: 16px; }
  .pc-shell { display: block; width: min(100% - 32px, var(--pv-max)); }
  .pc-drawer-toggle {
    display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px;
    border: 1px solid var(--pv-line); background: #fff; border-radius: 999px;
    padding: 11px 18px; font-weight: 800; font-size: 14px; color: var(--pv-navy); box-shadow: var(--pv-soft-shadow);
  }
  .pc-drawer-toggle svg { width: 18px; height: 18px; color: var(--pv-blue); }
  .pc-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 320px; max-width: 86vw; z-index: 1000;
    background: #fff; padding: 20px; overflow-y: auto; transform: translateX(-104%);
    transition: transform .28s ease; box-shadow: 0 30px 80px rgba(6,26,68,.3); border-radius: 0 18px 18px 0;
    grid-auto-rows: max-content;
  }
  #pv-catalog.pc-drawer-open .pc-sidebar { transform: translateX(0); }
  .pc-drawer-close { display: block; }
  .pc-drawer-backdrop { position: fixed; inset: 0; background: rgba(6,18,40,.5); z-index: 999; opacity: 0; pointer-events: none; transition: opacity .28s ease; }
  #pv-catalog.pc-drawer-open .pc-drawer-backdrop { display: block; opacity: 1; pointer-events: auto; }
}

@media (max-width: 760px) {
  .pc-trust { grid-template-columns: repeat(2, 1fr); }
  .pc-trust-item { border-left: 0 !important; padding-left: 0 !important; }
  .pc-toolbar-right { width: 100%; justify-content: space-between; }
  .pc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pc-card-body { padding: 12px 13px 14px; }
  .pc-name { font-size: 16px; }
  .pc-desc { display: none; }
  .pc-grid.is-list .pc-card { flex-direction: column; }
  .pc-grid.is-list .pc-card-media { width: 100%; }
}

@media (max-width: 460px) {
  .pc-trust { grid-template-columns: 1fr; }
  .pc-grid { grid-template-columns: 1fr 1fr; }
  .pc-head h1 { font-size: 28px; }
}
