/* Vista ampliada de imagen de producto (un solo overlay global). */
.bm-product-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.bm-product-image-lightbox[hidden] {
  display: none !important;
}

.bm-product-image-lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  max-width: min(90vw, 720px);
  max-height: 90vh;
  margin: 0;
  padding: 0;
  pointer-events: auto;
  box-sizing: border-box;
}

.bm-product-image-lightbox--has-description .bm-product-image-lightbox__dialog {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.bm-product-image-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 2px solid #2e7d12;
  border-radius: 50%;
  background: #4caf1b;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bm-product-image-lightbox__close:hover {
  background: #43a017;
  border-color: #25632d;
}

.bm-product-image-lightbox__close:focus-visible {
  outline: 2px solid #ff6a00;
  outline-offset: 2px;
}

.bm-product-image-lightbox__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.bm-product-image-lightbox--has-description .bm-product-image-lightbox__img {
  max-height: min(52vh, 420px);
  box-shadow: none;
  border-radius: 0;
}

.bm-product-image-lightbox__description {
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px 14px;
  background: #fff;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.45;
  max-height: min(28vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-word;
}

.bm-product-image-lightbox__description[hidden] {
  display: none !important;
}

/* Clickeable solo el marco/imagen marcado */
.store-product-card__media[data-product-image-preview],
.home-product-hit__media[data-product-image-preview],
.bm-fp__media[data-product-image-preview],
.admin-table__thumb-hit[data-product-image-preview] {
  cursor: pointer;
}

.admin-table__thumb-hit[data-product-image-preview] {
  display: inline-flex;
  vertical-align: middle;
}

body.bm-product-image-lightbox--open {
  overflow: hidden;
}
