:root {
  --gal-accent:     #c8a96e;
  --gal-dark:       #1a1a1a;
  --gal-mid:        #2e2e2e;
  --gal-text:       #f0ede8;
  --gal-muted:      #888;
  --gal-radius:     6px;
  --gal-thumb-size: 74px;
  --gal-overlay: rgba(10,10,10,0.60);
}

/* ---------- ESTRUTURA PRINCIPAL ---------- */
.produto-galeria {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  font-family: Georgia, 'Times New Roman', serif;
}

/* ---------- IMAGEM PRINCIPAL ---------- */
.gal-principal-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #FFFFFF;
  border-radius: var(--gal-radius);
  overflow: hidden;
  cursor: zoom-in;
}

.gal-principal-wrap img,
.gal-principal-wrap iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.25s ease;
}

.gal-principal-wrap img {
  object-fit: contain;
  background: #fff;
}

.gal-principal-wrap:hover img {
  transform: scale(1.03);
}

.gal-principal-wrap iframe {
  border: none;
  pointer-events: none; /* clique abre lightbox */
}

/* badge "play" sobre vídeo na principal */
.gal-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gal-play-badge svg {
  width: 56px;
  height: 56px;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: opacity 0.2s;
}
.gal-principal-wrap:hover .gal-play-badge svg { opacity: 1; }

/* legenda flutuante */
.gal-legenda {
  font-family: Poppins,'Open Sans',sans-serif;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.gal-principal-wrap:hover .gal-legenda { opacity: 1; transform: translateY(0); }

/* hint de zoom */
.gal-zoom-hint {
  font-family: Poppins,'Open Sans',sans-serif;
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.gal-principal-wrap:hover .gal-zoom-hint { opacity: 1; }

/* ---------- MINIATURAS ---------- */
.gal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.gal-thumb {
  border: none;
  width: var(--gal-thumb-size);
  height: var(--gal-thumb-size);
  border-radius: var(--gal-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s, transform 0.2s;
}

.gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gal-thumb:hover { transform: translateY(-2px); }
.gal-thumb:hover img { transform: scale(1.08); }

.gal-thumb.ativo {
  border-color: var(--gal-accent);
}

/* ícone play nas miniaturas de vídeo */
.gal-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  pointer-events: none;
}
.gal-thumb-play svg { width: 22px; height: 22px; opacity: 0.9; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
#gal-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--gal-overlay);
  align-items: center;
  justify-content: center;
}
#gal-lightbox.aberto { display: flex; }

.gal-lb-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  width: 95vw;
  animation: lbEntrar 0.28s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes lbEntrar {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

/* mídia no lightbox */
.gal-lb-media {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--gal-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gal-lb-media {
  background: transparent;
}

.gal-lb-media img {
  object-fit: contain;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  min-width: 900px;
  min-height: 900px;
}

.gal-lb-media .gal-lb-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
.gal-lb-media .gal-lb-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* descrição */
.gal-lb-desc {
  margin-top: 14px;
  max-width: 660px;
  text-align: center;
  color: var(--gal-text);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 40px;
}
.gal-lb-desc strong {
  display: block;
  font-size: 16px;
  color: var(--gal-accent);
  margin-bottom: 4px;
  font-family: Georgia, serif;
  letter-spacing: 0.04em;
}

/* contador */
.gal-lb-contador {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gal-muted);
  letter-spacing: 0.08em;
}

/* botões anterior / próximo */
.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  user-select: none;
  background: #000;
  border: 1px solid #fff;
}
.gal-lb-nav:hover { background: #222; transform: translateY(-50%) scale(1.08); }
.gal-lb-prev { left: 12px; }
.gal-lb-next { right: 12px; }

/* fechar */
.gal-lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gal-lb-fechar {
  position: fixed;
  top: -20px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: black;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10000;
  line-height: 1;
  border: 1px solid white;
}
.gal-lb-fechar:hover { transform: scale(1.1); }


/* miniaturas dentro do lightbox */
.gal-lb-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.gal-lb-thumb {
  width: 52px; height: 52px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.55;
  flex-shrink: 0;
  position: relative;
  background: #000;
}
.gal-lb-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.gal-lb-thumb.ativo { border-color: var(--gal-accent); opacity: 1; }
.gal-lb-thumb:hover { opacity: 0.9; }
.gal-lb-thumb .mini-play {
  position: absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,0.3);
}
.gal-lb-thumb .mini-play svg { width:14px; height:14px; }

/* responsivo */
@media (max-width: 700px) {
  .gal-lb-prev { left: -8px; }
  .gal-lb-next { right: -8px; }
  .gal-lb-nav { width:36px; height:36px; font-size:16px; background:rgba(0,0,0,0.5); }
}


.gal-lb-desc,
.gal-lb-contador,
.gal-lb-thumbs {
  display: none;
}