/* Patch 26 — фикс полноэкранного фото и плавающая кнопка назад */

.back-object-btn {
  display: none !important;
}

.floating-back-btn {
  position: fixed;
  left: 22px;
  bottom: 28px;
  z-index: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  color: #181a20;
  border: 1px solid var(--border);
  font-weight: 900;
  box-shadow: 0 18px 60px rgba(24,26,32,.16);
  transition: .18s ease;
}

.floating-back-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.photo-modal {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  background: rgba(0,0,0,.9) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 28px !important;
}

.photo-modal.active {
  display: flex !important;
}

.photo-modal img {
  display: block !important;
  max-width: min(94vw, 1280px) !important;
  max-height: 86vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.photo-close {
  position: fixed !important;
  right: 24px !important;
  top: 20px !important;
  z-index: 5010 !important;
  width: 50px !important;
  height: 50px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #181a20 !important;
  font-size: 34px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.photo-nav {
  position: fixed !important;
  top: 50% !important;
  z-index: 5010 !important;
  width: 60px !important;
  height: 60px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.96) !important;
  color: #181a20 !important;
  font-size: 48px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: .18s ease;
}

.photo-nav:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.photo-prev {
  left: 24px !important;
  transform: translateY(-50%) !important;
}

.photo-next {
  right: 24px !important;
  transform: translateY(-50%) !important;
}

.photo-modal-counter {
  position: fixed !important;
  left: 50% !important;
  bottom: 24px !important;
  transform: translateX(-50%) !important;
  z-index: 5010 !important;
  background: rgba(255,255,255,.96) !important;
  color: #181a20 !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
}

@media (max-width: 760px) {
  .floating-back-btn {
    left: 10px;
    bottom: 78px;
    min-height: 46px;
    padding: 0 16px;
    font-size: 14px;
  }

  .photo-modal {
    padding: 10px !important;
  }

  .photo-modal img {
    max-width: 96vw !important;
    max-height: 76vh !important;
    border-radius: 12px !important;
  }

  .photo-close {
    right: 10px !important;
    top: 10px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 28px !important;
  }

  .photo-nav {
    width: 46px !important;
    height: 46px !important;
    font-size: 36px !important;
  }

  .photo-prev {
    left: 8px !important;
  }

  .photo-next {
    right: 8px !important;
  }

  .photo-modal-counter {
    bottom: 12px !important;
  }
}
