/* Catalog — j5 custom.css + blog.php inline (must load AFTER pgsv-library.css) */
.inner-page {
  padding: 28px 0 10px;
  background: #f4f6fb;
}
.library-page {
  background: #f4f6fb !important;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad, linear-gradient(135deg, #0345BF, #2bb8d4)) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(3, 69, 191, 0.32) !important;
}
.btn-primary:hover {
  filter: brightness(1.08) saturate(1.05);
  box-shadow: 0 18px 40px rgba(3, 69, 191, 0.4) !important;
}
.btn-link {
  background: none !important;
  border: 0 !important;
  color: var(--blue, #0345BF) !important;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}
.btn-link:hover { background: rgba(3, 69, 191, 0.08) !important; }

/* search panel */
.catalog-layout { align-items: flex-start !important; }
.catalog-sidebar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 110px !important;
  align-self: flex-start !important;
  z-index: 5;
  flex: 0 0 240px;
  max-width: 240px;
}
.catalog-search {
  background: #fff !important;
  border: 1px solid #c5cdd8 !important;
  border-radius: 12px !important;
  padding: 18px 16px;
  box-shadow: 0 8px 28px rgba(15, 40, 80, 0.08);
}
.catalog-search label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #1a1a1a !important;
}
.catalog-search input,
.catalog-search select {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 4px 0 0 !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(15, 40, 80, 0.14) !important;
  border-radius: 12px !important;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  color: #0b1220 !important;
  outline: none !important;
}
.catalog-search input:focus,
.catalog-search select:focus {
  outline: none !important;
  border-color: #0345BF !important;
  box-shadow: 0 0 0 3px rgba(3, 69, 191, 0.12) !important;
}
.catalog-search input::placeholder { color: #6b7280; }
/* kill mobile orange / autofill glow */
.catalog-search input:-webkit-autofill,
.catalog-search input:-webkit-autofill:hover,
.catalog-search input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #0b1220 !important;
  caret-color: #0b1220;
}
.catalog-search input[type="text"],
.catalog-search select {
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}
.catalog-search select {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%230b1220' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 32px !important;
}
.catalog-search label {
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.catalog-search-btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.04) 42%, rgba(0,0,0,0.06) 100%),
    linear-gradient(145deg, #1EA0BF 0%, #0F8FB5 48%, #0345BF 100%) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 15px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -2px 6px rgba(0,0,0,0.12) inset,
    0 14px 28px rgba(30, 160, 191, 0.28) !important;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.catalog-search-btn:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -2px 6px rgba(0,0,0,0.12) inset,
    0 18px 34px rgba(30, 160, 191, 0.34) !important;
}
.catalog-search-reset {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: #0345BF;
  font-weight: 600;
  text-decoration: none;
}
.catalog-search-fab { display: none; }

/* cards */
.catItemView {
  background: #fff !important;
  border: 1px solid rgba(15, 40, 80, 0.1) !important;
  border-radius: 18px !important;
  margin: 0 0 22px;
  padding: 22px 24px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(15, 40, 80, 0.1) !important;
}
.catItemHeader { overflow: hidden; }
.catItemImageBlock {
  float: left;
  width: 300px;
  margin: 0 24px 12px 0;
}
.catItemImage img {
  width: 300px;
  height: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}
.catItemExtraFields { overflow: hidden; min-width: 0; }
.catItemTitle {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 600;
}
.catItemTitle a { color: #1a1a1a; text-decoration: none; }
.catItemTitle a:hover { color: #0345BF; }
.catItemExtraFields ul { list-style: none; margin: 0; padding: 0; }
.catItemExtraFields li {
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid #e8e8e8;
}
.catItemExtraFields li:last-child { border-bottom: 0; }
.catItemExtraFieldsLabel {
  color: #1a2433 !important;
  font-weight: 500 !important;
  margin-right: 6px;
}
.catItemExtraFieldsValue {
  color: #0b1220 !important;
  font-weight: 700 !important;
}
.catItemExtraFieldsValue a {
  color: #0345BF;
  text-decoration: none !important;
}
.catItemBody { clear: both; display: none; }
.clr { clear: both; height: 0; line-height: 0; font-size: 0; }

/* catalog CTA — pill bottom-right of card (j5 final) */
.bottom {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}
a.pgs-btn-pill,
.pgs-btn-pill,
.bottom > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 14px 30px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 999px !important;
  background: var(--grad, linear-gradient(135deg, #0345BF, #2bb8d4)) !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  filter: none !important;
  text-shadow: none !important;
}
a.pgs-btn-pill:hover,
.pgs-btn-pill:hover,
.bottom > a:hover {
  filter: brightness(1.08) saturate(1.05);
  box-shadow: none !important;
  transform: translateY(-1px);
  color: #fff !important;
}
.pgs-btn-pill .pgs-ico {
  font-size: 18px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.pgs-btn-pill:hover .pgs-ico { transform: translateX(3px); }

/* pagination */
.pagination {
  display: block !important;
  margin: 28px 0 10px;
  text-align: center !important;
}
.pagination-list {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto !important;
  padding: 0;
  list-style: none;
  justify-content: center;
}
.pagination .page-link {
  display: block;
  min-width: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(3, 69, 191, 0.25) !important;
  border-radius: 12px !important;
  background: #fff;
  color: var(--blue, #0345BF) !important;
  font-size: 14px;
  font-weight: 700 !important;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pagination .page-link:hover {
  background: #eef3ff;
  border-color: var(--blue, #0345BF);
  color: var(--blue, #023a9e);
}
.pagination .page-link.active {
  background: var(--grad, linear-gradient(135deg, #0345BF, #2bb8d4)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(3, 69, 191, 0.3);
}
.pagination .counter.counter-block {
  display: block !important;
  width: 100%;
  clear: both;
  margin: 14px 0 0 !important;
  text-align: center !important;
  color: #222 !important;
}
.catalog-count, .catalog-found { color: #222 !important; }
.catalog-empty {
  padding: 24px;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 12px;
}

/* mobile: search becomes floating icon + modal */
@media (max-width: 991px) {
  .catalog-sidebar {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    order: -1;
    z-index: auto !important;
  }
  .catalog-layout { flex-direction: column; }
  .catalog-search {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 64px 18px 90px;
    overflow-y: auto;
    background: #fff !important;
    box-shadow: none;
  }
  .catalog-search.open { display: block; }
  .catalog-search-fab {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #1EA0BF, #0345BF);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 8px 22px rgba(30, 160, 191, 0.42);
    z-index: 10051;
    cursor: pointer;
  }
  #pgs-to-top {
    right: 18px;
    bottom: 90px;
  }
  .catalog-search .catalog-search-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef3ff;
    color: #0345BF;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    z-index: 10060;
    box-shadow: 0 4px 14px rgba(3, 69, 191, 0.18);
  }
}
@media (min-width: 992px) {
  .catalog-search .catalog-search-close { display: none !important; }
}
@media (max-width: 767px) {
  .catItemImageBlock {
    float: none;
    width: 100%;
    margin: 0 0 14px;
    text-align: center;
  }
  .catItemImage img { width: 260px; }
}

/* book covers: never squash */
.catItemView img,
.catItemView .catItemImage img,
.catalog .catItemView img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
  max-height: 420px !important;
  object-fit: contain !important;
}