/* Listing-photo lightbox (assets/js/lightbox.js) — 2026-08-24.
   Own stylesheet so style.css (1-year cache) stays untouched. */
.lbx {
  /* above the cookie banner (1000010) and the support-chat FAB/panel (1000000) */
  position: fixed; inset: 0; z-index: 1000020;
  display: flex; flex-direction: column;
  background: rgba(7, 8, 14, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font-family: inherit;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
.lbx.is-open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.lbx[hidden] { display: none; }

/* top bar */
.lbx-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); z-index: 3; }
.lbx-counter { font-weight: 700; font-size: .88rem; letter-spacing: .02em; color: rgba(255,255,255,.88); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); padding: 7px 13px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.lbx-counter[hidden] { visibility: hidden; display: block; }
.lbx-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lbx-zoom { min-width: 54px; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); }

.lbx-btn {
  appearance: none; -webkit-appearance: none; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); color: #fff;
  width: 42px; height: 42px; border-radius: 12px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease, transform .15s ease, opacity .15s ease; line-height: 1;
}
.lbx-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lbx-btn:hover { background: rgba(255,255,255,.17); }
.lbx-btn:active { transform: scale(.94); }
.lbx-btn:focus-visible { outline: 2px solid #e8b84b; outline-offset: 2px; }
.lbx-btn:disabled { opacity: .32; cursor: default; transform: none; }
.lbx-btn:disabled:hover { background: rgba(255,255,255,.08); }
.lbx-close { margin-left: 6px; }

/* stage */
.lbx-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.lbx.is-zoomed .lbx-stage { cursor: grab; }
.lbx.is-dragging .lbx-stage { cursor: grabbing; }
.lbx-img {
  display: block; max-width: 100%; max-height: 100%; object-fit: contain;
  transform-origin: center center; will-change: transform, opacity;
  border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.65);
  transition: opacity .18s ease;
}
.lbx.is-zoomed .lbx-img { border-radius: 0; box-shadow: none; }
.lbx.is-loading .lbx-img { opacity: 0; }
.lbx-spinner {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.14); border-top-color: #e8b84b;
  animation: lbx-spin .8s linear infinite; display: none; pointer-events: none;
}
.lbx.is-loading .lbx-spinner { display: block; }
@keyframes lbx-spin { to { transform: rotate(360deg); } }
.lbx-error { position: absolute; padding: 14px 22px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.8); font-size: .92rem; }
.lbx-error[hidden] { display: none; }

/* prev / next */
.lbx-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(14, 15, 24, .62); border-color: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lbx-nav svg { width: 26px; height: 26px; }
.lbx-nav:hover { background: rgba(232,184,75,.22); border-color: rgba(232,184,75,.5); }
.lbx-nav:active { transform: translateY(-50%) scale(.94); }
.lbx-prev { left: 18px; }
.lbx-next { right: 18px; }
.lbx-nav[hidden] { display: none; }

/* hint toast */
.lbx-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; font-size: .78rem; white-space: nowrap;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.85);
  pointer-events: none; animation: lbx-hint .3s ease;
}
.lbx-hint[hidden] { display: none; }
@keyframes lbx-hint { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* thumbnail strip */
.lbx-thumbs {
  display: flex; gap: 8px; padding: 10px 16px 14px; overflow-x: auto; overflow-y: hidden;
  justify-content: safe center; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  touch-action: pan-x; z-index: 3;
}
.lbx-thumbs::-webkit-scrollbar { display: none; }
.lbx-thumbs[hidden] { display: none; }
.lbx-thumb {
  flex: 0 0 auto; width: 68px; height: 50px; border-radius: 9px; overflow: hidden; padding: 0;
  border: 2px solid transparent; background: #000; opacity: .5; cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease, transform .15s ease;
}
.lbx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.lbx-thumb:hover { opacity: .85; }
.lbx-thumb.is-active { border-color: #e8b84b; opacity: 1; box-shadow: 0 0 0 1px rgba(232,184,75,.45); }
.lbx-thumb:focus-visible { outline: 2px solid #e8b84b; outline-offset: 1px; opacity: 1; }

/* in-page gallery affordances (listing.php) */
.ld2 .gallery-main-wrap { position: relative; }
.gallery-expand {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(10, 11, 20, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: .78rem; font-weight: 700; cursor: pointer; letter-spacing: .01em;
  transition: background .15s ease, transform .15s ease;
}
.gallery-expand svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-expand:hover { background: rgba(232,184,75,.28); }
.gallery-expand:active { transform: scale(.96); }

@media (max-width: 640px) {
  .lbx-top { padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .lbx-btn { width: 38px; height: 38px; border-radius: 10px; }
  .lbx-zoom { min-width: 46px; font-size: .74rem; }
  .lbx-zoom-reset { display: none; }
  .lbx-nav { width: 44px; height: 44px; }
  .lbx-prev { left: 8px; }
  .lbx-next { right: 8px; }
  .lbx-thumb { width: 56px; height: 42px; }
  .lbx-hint { font-size: .72rem; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .lbx, .lbx-img, .lbx-btn, .lbx-thumb, .gallery-expand { transition: none !important; }
  .lbx-hint { animation: none; }
}
