/* LEDC Product Gallery v1.4.1 */

.pg-wrap {
  width: 100%;
  font-family: inherit;
}

/* Spacing from the right-hand details column (desktop only) */
@media (min-width: 981px) {
  .pg-wrap { padding-right: 32px; }   /* tweak this gap to taste */
}

/* Main container - holds image + thumbs, has the border */
.pg-main {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}

/* Main image */
.pg-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #ffffff;
  transition: opacity 0.15s;
  will-change: transform, opacity, border-radius;
  backface-visibility: hidden;
}

.pg-main-img.pg-loading { opacity: 0.4; }

/* Shared-element transition: the main image flies in from the clicked
   thumbnail and scales into place. Driven by the Web Animations API in
   gallery.js (it reads prefers-reduced-motion and skips when set). */

/* Zoom button - circle, white bg, dark green icon */
.pg-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  transition: box-shadow 0.13s, transform 0.13s;
  z-index: 2;
}

.pg-zoom-btn:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transform: scale(1.06);
}

.pg-zoom-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Thumbnails - inside border at the bottom */
.pg-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  justify-content: center;
  flex-wrap: wrap;
}

.pg-thumb {
  width: 86px;
  height: 86px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;          /* match the main image background */
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.13s, box-shadow 0.13s, transform 0.16s ease;
}

.pg-thumb:hover:not(.is-active) {
  border-color: transparent;
  transform: translateY(-3px) scale(1.05);
}

.pg-thumb.is-active {
  border: 2.5px solid #0d4d2e;
  box-shadow: 0 0 0 2px rgba(13,77,46,0.15);
}

.pg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Lightbox */
.pg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-lightbox[hidden] { display: none; }

.pg-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  cursor: zoom-out;
}

.pg-lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.pg-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: background 0.13s;
}

.pg-lightbox-close:hover { background: #f0f0f0; }

.pg-lightbox-close svg {
  width: 15px;
  height: 15px;
  color: #222222;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .pg-thumb    { width: 64px; height: 64px; }
  .pg-zoom-btn { width: 36px; height: 36px; }
}
