/* ============================================================
   FLORA77 - Product Detail Lightbox (pd-lightbox.css)
   Image lightbox / zoom gallery
   ============================================================ */

/* ── Lightbox Overlay ── */
.pd-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,26,0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.pd-lightbox-overlay.open {
  display: flex;
  animation: lbFadeIn 0.2s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Lightbox Container ── */
.pd-lightbox-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pd-lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lbZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbZoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Controls ── */
.pd-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.pd-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.pd-lightbox-prev,
.pd-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.pd-lightbox-prev { left: 16px; }
.pd-lightbox-next { right: 16px; }

.pd-lightbox-prev:hover,
.pd-lightbox-next:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.05);
}

/* ── Counter ── */
.pd-lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ── Thumbnail Strip (bottom) ── */
.pd-lightbox-thumbs {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px 0;
}

.pd-lightbox-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s;
}

.pd-lightbox-thumb:hover { border-color: rgba(255,255,255,0.3); }
.pd-lightbox-thumb.active { border-color: var(--accent, #22c55e); }

.pd-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .pd-lightbox-container {
    max-height: 80vh;
    padding: 10px;
  }
  .pd-lightbox-image {
    max-height: 75vh;
  }
  .pd-lightbox-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
  }
  .pd-lightbox-prev,
  .pd-lightbox-next {
    width: 38px;
    height: 38px;
  }
  .pd-lightbox-prev { left: 8px; }
  .pd-lightbox-next { right: 8px; }
}
