.bb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bb-lightbox[hidden] { display: none; }

.bb-lightbox:not([hidden]) {
  animation: bbLightboxBackdropIn 0.2s ease;
}
.bb-lightbox:not([hidden]) .bb-lightbox-sheet {
  animation: bbLightboxSheetIn 0.2s ease;
}
@keyframes bbLightboxBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bbLightboxSheetIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.bb-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 18, 8, 0.55);
}

.bb-lightbox-sheet {
  position: relative;
  min-width: 160px;
  min-height: 160px;
  max-width: min(90vw, 560px);
  max-height: 90vh;
}

.bb-lightbox-sheet img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  background: var(--white, #fff);
  box-shadow: 0 24px 64px rgba(26, 18, 8, 0.25);
}

.bb-lightbox-loading .bb-lightbox-img {
  visibility: hidden;
}

.bb-lightbox-loading .bb-lightbox-sheet::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(26, 18, 8, 0.15);
  border-top-color: var(--brand, #d97a4d);
  border-radius: 50%;
  animation: bbLightboxSpin 0.8s linear infinite;
}

@keyframes bbLightboxSpin {
  to { transform: rotate(360deg); }
}

.bb-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--white, #fff);
  color: var(--text-mid, #555);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(26, 18, 8, 0.18);
  transition: background 0.15s, color 0.15s;
}

.bb-lightbox-close:hover {
  background: var(--border, #e5e0d8);
  color: var(--text-dark, #222);
}

.bb-photo-zoomable {
  cursor: pointer;
}

.bb-photo-zoomable:hover,
.bb-photo-zoomable:focus-visible {
  opacity: 0.85;
}
