/* Product Gallery Lightbox Styles */

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.product-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.product-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.product-lightbox__container {
  position: relative;
  z-index: 10;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.product-lightbox__content {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 750px;
  max-height: 85vh;
}

.product-lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Navigation Arrows */
.product-lightbox__nav {
  position: relative;
  z-index: 11;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(248, 244, 236, 0.9);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
}

.product-lightbox__nav:hover {
  background: rgba(201, 168, 76, 0.25);
  border-color: rgba(201, 168, 76, 0.5);
  color: var(--clr-gold, #c9a84c);
  transform: scale(1.1);
}

.product-lightbox__nav:active {
  transform: scale(0.95);
}

.product-lightbox__nav i {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Close Button */
.product-lightbox__close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(248, 244, 236, 0.8);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 12;
}

.product-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(201, 168, 76, 0.3);
  color: var(--clr-gold, #c9a84c);
}

/* Image Counter */
.product-lightbox__counter {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(248, 244, 236, 0.9);
  letter-spacing: 0.05em;
  z-index: 11;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .product-lightbox__container {
    gap: 1rem;
  }

  .product-lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .product-lightbox__close {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    top: -2.5rem;
  }

  .product-lightbox__counter {
    font-size: 0.78rem;
    padding: 0.5rem 1rem;
    bottom: -2rem;
  }
}

@media (max-width: 768px) {
  .product-lightbox__container {
    gap: 0.75rem;
  }

  .product-lightbox__content {
    max-height: 70vh;
  }

  .product-lightbox__img {
    max-height: 70vh;
    border-radius: 6px;
  }

  /* Bottom control bar: ‹  4/10  › */
  .product-lightbox__nav {
    position: fixed !important;
    bottom: 1.5rem !important;
    top: auto !important;
    transform: none !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 1.05rem !important;
    z-index: 20;
  }

  .product-lightbox__nav--prev {
    left: 50% !important;
    right: auto !important;
    margin-left: -88px !important;
  }

  .product-lightbox__nav--next {
    right: 50% !important;
    left: auto !important;
    margin-right: -88px !important;
  }

  .product-lightbox__close {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    top: 0.75rem;
    right: 0.75rem;
  }

  .product-lightbox__counter {
    position: fixed !important;
    bottom: 1.85rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    z-index: 20;
  }
}

@media (max-width: 480px) {
  .product-lightbox__container {
    gap: 0.5rem;
    flex-direction: column;
  }

  .product-lightbox__nav {
    position: fixed !important;
    bottom: 1.25rem !important;
    top: auto !important;
    transform: none !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 0.95rem !important;
    z-index: 20;
  }

  .product-lightbox__nav--prev {
    left: 50% !important;
    right: auto !important;
    margin-left: -82px !important;
  }

  .product-lightbox__nav--next {
    right: 50% !important;
    left: auto !important;
    margin-right: -82px !important;
  }

  .product-lightbox__close {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    top: 0.6rem;
    right: 0.6rem;
  }

  .product-lightbox__content {
    max-height: 70vh;
    width: 100%;
  }

  .product-lightbox__img {
    max-height: 70vh;
  }

  .product-lightbox__counter {
    display: block !important;
    position: fixed !important;
    bottom: 1.55rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 0.78rem;
    padding: 0.45rem 0.95rem;
    z-index: 20;
  }
}

/* Support for touch devices */
@media (hover: none) and (pointer: coarse) {
  .product-lightbox__nav:active {
    background: rgba(201, 168, 76, 0.35);
  }
}
