/* ===== Modal (lightbox) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
  top: 100vh;
  /* visibilidade controlada por classe */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.open {
  top: 0px;
  opacity: 1;
  visibility: visible;
}

body.noscroll {
  overflow: hidden;
}

/* Área do conteúdo */
.lightbox__content {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
}

.lightbox__img {
  display: block;
  max-width: 80vw;
  max-height: 80vh;
}

/* Botões */
.lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  color: #fff;
  cursor: pointer;

  transition: color 0.3s ease, transform 0.06s ease;
}

.lightbox__btn svg path {
  transition: fill 0.3s ease;
}

.lightbox__btn:hover svg path {
  fill: var(--orange);
}

.lightbox__prev {
  left: -120px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__next {
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.lightbox__counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font: var(--detail-min-regular);
  color: #fff;

  transition: opacity 0.2s ease;
  user-select: none;
}

/* Responsivo*/
@media (max-width: 1024px) {
  .lightbox {
    padding: 0px;
  }
  .lightbox__content {
    position: static;

    max-width: 100vw;
    max-height: 100vh;
  }

  .lightbox__img {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
  }

  .lightbox__next svg,
  .lightbox__prev svg {
    width: 24px;
    height: 24px;
  }
  .lightbox__prev {
    left: 20px;
    bottom: 20px;
    top: unset;
    transform: translateY(0%);
  }
  .lightbox__next {
    right: 20px;
    bottom: 20px;
    top: unset;
    transform: translateY(0%);
  }

  .lightbox__btn:hover svg path {
    fill: var(--white);
  }

  .lightbox__counter {
    bottom: 20px;
  }
}
