.gallery-popover {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.gallery-popover--active {
  display: block;
}

.gallery-popover__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.gallery-popover__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  display: flex;
  width: fit-content;
  height: fit-content;
  align-items: center;
  justify-content: center;
}

.gallery-popover__image {
  max-width: 70vw;
  max-height: 70vh;
  object-fit: contain;
  z-index: 1;
  user-select: none;
}

.gallery-popover__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.gallery-popover__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-popover__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.gallery-popover__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-popover__nav--prev {
  left: 20px;
}

.gallery-popover__nav--next {
  right: 20px;
}

.gallery-popover__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 20px;
  z-index: 2;
}

/* Мобильные стили */
@media (width <= 768px) {
  .gallery-popover__nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .gallery-popover__close {
    width: 35px;
    height: 35px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }
}
