/* Modulo Stile Lightbox Fotografico (Tempo di Scatto) */
/* Visualizzatore a Schermo Intero con Navigazione a Frecce per Categoria */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  user-select: none;
}
.lightbox-overlay:not(.active) * {
  pointer-events: none !important;
}
.lightbox-overlay:not(.active) .photo-shield {
  display: none !important;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Header Lightbox (Top Bar) */
.lightbox-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}
.lightbox-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a1a1aa;
}
.lightbox-counter-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 9999px;
  color: #fafafa;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  font-family: 'Jost', sans-serif;
}
.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fafafa;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
}
.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

/* Area Immagine Centrale */
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 70px;
}
.lightbox-img-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 72vh;
  display: inline-block;
}
.lightbox-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.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Frecce di Navigazione Laterali */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fafafa;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}
.lightbox-nav-btn:hover {
  background: #fafafa;
  color: #09090b;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}
.lightbox-prev-btn {
  left: 16px;
}
.lightbox-next-btn {
  right: 16px;
}

/* Barra Dettagli Inferiore */
.lightbox-footer {
  padding: 16px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: linear-gradient(to top, rgba(5, 5, 8, 0.95), transparent);
}
.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fafafa;
}
.lightbox-caption {
  font-size: 13px;
  color: #a1a1aa;
  max-width: 600px;
}
.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.lightbox-price {
  font-size: 15px;
  font-weight: 600;
  color: #ffc439;
  font-family: 'Jost', sans-serif;
}
.lightbox-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #fafafa;
  color: #09090b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}
.lightbox-buy-btn:hover {
  background: #ffc439;
  transform: translateY(-1px);
}

/* Hover e Puntatore Lente su miniature del catalogo e sezione macro */
.photo-item .photo-shield,
#macro article .photo-shield,
#macro .photo-shield {
  cursor: zoom-in !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Indicatore visivo "La Lente" che appare al passaggio del mouse */
.photo-item .photo-shield::after,
#macro article .photo-shield::after,
#macro .photo-shield::after {
  content: '';
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(18, 18, 24, 0.78);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3Cline x1='11' y1='8' x2='11' y2='14'%3E%3C/line%3E%3Cline x1='8' y1='11' x2='14' y2='11'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.photo-item:hover .photo-shield::after,
#macro article:hover .photo-shield::after,
.photo-item .photo-shield:hover::after,
#macro .photo-shield:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* All'interno del lightbox a schermo intero nasconde la lente */
.lightbox-overlay .photo-shield,
.lightbox-img-wrapper .photo-shield {
  cursor: default !important;
}
.lightbox-overlay .photo-shield::after,
.lightbox-img-wrapper .photo-shield::after {
  display: none !important;
}

/* Responsive Mobile & Smartphone Landscape */
@media (max-width: 640px) {
  .lightbox-stage { padding: 0 40px; }
  .lightbox-nav-btn { width: 38px; height: 38px; }
  .lightbox-prev-btn { left: 8px; }
  .lightbox-next-btn { right: 8px; }
  .lightbox-title { font-size: 18px; }
  .lightbox-caption { font-size: 12px; }
}

@media (orientation: landscape) and (max-height: 550px), (max-height: 480px) {
  .lightbox-header { padding: 8px 16px; }
  .lightbox-close-btn { width: 32px; height: 32px; font-size: 22px; }
  .lightbox-stage { padding: 0 46px; }
  .lightbox-nav-btn { width: 32px; height: 32px; font-size: 12px; }
  .lightbox-prev-btn { left: 6px; }
  .lightbox-next-btn { right: 6px; }
  .lightbox-img-wrapper { max-width: 88vw; max-height: calc(100vh - 76px); }
  .lightbox-img { max-width: 88vw; max-height: calc(100vh - 76px); object-fit: contain; }
  .lightbox-footer {
    padding: 6px 16px 8px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .lightbox-title { font-size: 14px; }
  .lightbox-caption { display: none; }
  .lightbox-actions { margin-top: 0; gap: 8px; }
  .lightbox-price { font-size: 13px; }
  .lightbox-buy-btn { padding: 5px 14px; font-size: 10px; }
}

