/* Product library page (ported from the retired /suncity site) */
:root {
  --azure: #157bb2;
  --font-display: var(--font-body, "Poppins", sans-serif);
  --gold-ink: #866633;
}

.pd-crumb { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pd-crumb a { color: var(--navy); }

.library { padding: 40px 0 72px; }
.library-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.library-count { font-size: 13px; color: var(--muted); }
.library-bar [hidden] { display: none; }
.library-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lib-item {
  position: relative; aspect-ratio: 1; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); background: #f7f4ee;
  content-visibility: auto; contain-intrinsic-size: 300px;
}
.lib-item[hidden] { display: none; }
.lib-item:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.lib-item img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .3s var(--ease); }
.lib-item:hover img { transform: scale(1.03); }
.lib-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  font-size: 11px; line-height: 1.3; color: var(--navy);
  background: linear-gradient(transparent, rgba(255,255,255,.94));
}
.library-note { margin-top: 22px; font-size: 12px; color: var(--muted); }
.library-empty { margin-top: 18px; font-size: 14px; color: var(--muted); }
.library-empty[hidden] { display: none; }
.library-empty p { margin: 0; }
.lib-clear {
  border: 0; background: none; padding: 0; margin-left: 6px;
  color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer;
}
.lib-modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: rgba(9, 20, 35, .82);
}
.lib-modal[hidden] { display: none; }
.lib-modal-inner { max-width: min(920px, 92vw); text-align: center; }
.lib-modal img { max-width: min(920px, 92vw); max-height: 78vh; width: auto; height: auto; margin-inline: auto; background: #fff; }
.lib-modal p { margin-top: 10px; color: #fff; font-size: 13px; }
.lib-close {
  position: absolute; top: 12px; right: 20px; border: 0; background: transparent;
  color: #fff; font-size: 38px; line-height: 1; cursor: pointer;
}
@media (max-width: 989px) {
  .library-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 749px) {
  .library-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .library-bar { align-items: flex-start; flex-direction: column; }
}
.lib-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.35); background: rgba(9,20,35,.55);
  color: #fff; font-size: 28px; line-height: 1;
}
.lib-nav:hover { background: rgba(9,20,35,.82); }
.lib-nav--prev { left: 18px; }
.lib-nav--next { right: 18px; }
@media (max-width: 749px) {
  .lib-nav { width: 38px; height: 38px; font-size: 24px; }
  .lib-nav--prev { left: 8px; }
  .lib-nav--next { right: 8px; }
}
.library-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.lib-search {
  flex: 1 1 240px; min-width: 200px; padding: 9px 12px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.lib-search:focus { outline: 2px solid var(--azure); outline-offset: 2px; border-color: var(--azure); }
.lib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-chips button {
  font: inherit; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--navy); cursor: pointer;
}
.lib-chips button.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 749px) {
  .library-tools { align-items: stretch; }
  .lib-search { flex-basis: 100%; }
}
.lib-modal-actions { margin-top: 16px; }
.lib-modal-actions .btn { font-size: 12px; padding: 12px 22px; }