/* ============================================================
   Sarte Living — Peaceful Lightbox / Image Zoom Viewer
   ============================================================ */

/* ── Lightbox Overlay ─────────────────────────────────────── */
.sarte-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.sarte-lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* ── Backdrop with Deep Blur ──────────────────────────────── */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1;
}

/* ── Lightbox Header ──────────────────────────────────────── */
.lightbox-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.85) 0%, rgba(8, 8, 10, 0) 100%);
  pointer-events: auto;
}

.lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lightbox-title {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.lightbox-counter {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.lightbox-action-btn:active {
  transform: scale(0.96);
}

.lightbox-close-btn:hover {
  background: rgba(197, 168, 128, 0.25);
  border-color: var(--accent-gold, #C5A880);
  color: var(--accent-gold, #C5A880);
}

/* ── Lightbox Main Stage ──────────────────────────────────── */
.lightbox-stage {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  overflow: hidden;
}

.lightbox-img-wrapper {
  position: relative;
  max-width: 92vw;
  max-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-img-wrapper.is-zoomed {
  cursor: zoom-out;
  transform: scale(1.65);
}

.lightbox-main-img {
  max-width: 90vw;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform, opacity;
}

.lightbox-main-img.fade-out {
  opacity: 0;
  transform: scale(0.97);
}

/* ── Loading Spinner ──────────────────────────────────────── */
.lightbox-loader {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-gold, #C5A880);
  border-radius: 50%;
  animation: lightboxSpin 0.8s linear infinite;
  display: none;
  pointer-events: none;
}

.lightbox-loader.active {
  display: block;
}

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

/* ── Navigation Arrows ────────────────────────────────────── */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-fast, 0.2s ease);
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.lightbox-nav-btn.prev {
  left: 28px;
}

.lightbox-nav-btn.next {
  right: 28px;
}

/* ── Lightbox Footer ──────────────────────────────────────── */
.lightbox-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px 24px;
  background: linear-gradient(0deg, rgba(8, 8, 10, 0.95) 0%, rgba(8, 8, 10, 0) 100%);
  pointer-events: auto;
}

/* Thumbnail Strip */
.lightbox-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  max-width: 60%;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.lightbox-thumbs::-webkit-scrollbar {
  height: 4px;
}

.lightbox-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.lightbox-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lightbox-thumb:hover {
  opacity: 0.85;
  transform: scale(1.04);
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--accent-gold, #C5A880);
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.3);
}

/* Action Buttons inside Lightbox */
.lightbox-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lightbox-footer-actions .btn {
  padding: 10px 20px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.lightbox-footer-actions .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-footer-actions .btn-secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Product Card Image Zoom Button & Hover Clues ─────────── */
.product-card-img-container {
  cursor: zoom-in;
}

.card-zoom-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  opacity: 0.85;
  transition: all var(--transition-fast, 0.2s ease);
}

.product-card:hover .card-zoom-btn {
  opacity: 1;
  transform: scale(1.08);
  background: rgba(197, 168, 128, 0.9);
  border-color: var(--accent-gold, #C5A880);
  color: #0c0c0e;
}

.card-zoom-btn:hover {
  transform: scale(1.15) !important;
}

/* ── Customizer Zoom Button ───────────────────────────────── */
.customizer-preview-img {
  cursor: zoom-in;
}

.customizer-zoom-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(20, 20, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 16;
  transition: all 0.2s ease;
}

.customizer-zoom-btn:hover {
  background: rgba(197, 168, 128, 0.9);
  border-color: var(--accent-gold, #C5A880);
  color: #0c0c0e;
  transform: translateY(-1px);
}

/* ── Mobile Responsiveness ────────────────────────────────── */
@media (max-width: 768px) {
  .lightbox-header {
    padding: 14px 16px;
  }
  
  .lightbox-title {
    font-size: 1.05rem;
    max-width: 65vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .lightbox-stage {
    padding: 0 8px;
  }
  
  .lightbox-nav-btn {
    width: 42px;
    height: 42px;
    background: rgba(20, 20, 22, 0.6);
  }
  
  .lightbox-nav-btn.prev {
    left: 8px;
  }
  
  .lightbox-nav-btn.next {
    right: 8px;
  }
  
  .lightbox-footer {
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 12px;
  }
  
  .lightbox-thumbs {
    max-width: 100%;
    justify-content: flex-start;
  }
  
  .lightbox-thumb {
    width: 48px;
    height: 48px;
  }
  
  .lightbox-footer-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .lightbox-footer-actions .btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.78rem;
  }
  
  .card-zoom-btn {
    width: 32px;
    height: 32px;
    bottom: 10px;
    right: 10px;
    opacity: 0.9;
  }
}
