/* RMM Lightbox Styles - glass effect */
.rmm-lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(10, 16, 14, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  animation: rmm-fade-in 180ms ease-out;
  overscroll-behavior: contain;
  touch-action: none; /* block background scroll & gestures */
}

.rmm-lightbox-overlay.active { display: flex; }

.rmm-lightbox-content {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: min(92vh, 900px);
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  transform: translateY(8px) scale(0.985);
  animation: rmm-pop 220ms cubic-bezier(.2,.8,.2,1) forwards;
  overflow: hidden;
  z-index: 1;
}

.rmm-lightbox-image-el {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 28px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  will-change: transform;
  transition: transform 0.2s ease;
  transform-origin: center center;
  position: relative;
  z-index: 1;
}

.rmm-lightbox-image-el.zoomed {
  cursor: grab;
  transform: scale(var(--rmm-zoom, 2)) translate(var(--rmm-pan-x, 0px), var(--rmm-pan-y, 0px));
}

.rmm-lightbox-image-el.zoomed:active {
  cursor: grabbing;
}

/* Caption bar under image: left=title, right=price */
.rmm-lightbox-caption {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  position: relative;
  z-index: 2;
}

.rmm-lightbox-title {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.2;
}

.rmm-lightbox-price {
  font-size: clamp(16px, 2.1vw, 20px);
  font-weight: 700;
  color: var(--rmm-primary-color, #d4af37);
  white-space: nowrap;
}

.rmm-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 5;
  pointer-events: auto;
}
.rmm-lightbox-close:hover { background: rgba(255,255,255,0.28); transform: rotate(90deg); }
.rmm-lightbox-close:before, .rmm-lightbox-close:after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: #fff;
}
.rmm-lightbox-close:before { transform: rotate(45deg); }
.rmm-lightbox-close:after { transform: rotate(-45deg); }

@keyframes rmm-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes rmm-pop { to { transform: translateY(0) scale(1) } }

/* Body lock while open */
body.rmm-lightbox-open { overflow: hidden; }
/* iOS lock: also fixed positioning is applied via JS to freeze scroll position */

.rmm-lightbox-image-el { touch-action: none; }

/* Support dark backgrounds: optional subtle frame */
.rmm-lightbox-content::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* Touch improvements */
@media (hover:none) {
  .rmm-lightbox-close:hover { transform: none; }
}
