/* Proje detay modalı — mobil önce, çakışmasız pm- öneki */

.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 0;
  box-sizing: border-box;
}

.pm-overlay.is-open {
  display: flex;
}

body.pm-open {
  overflow: hidden !important;
}

body.pm-open .site-header-fixed,
body.pm-open .scroll-top,
body.pm-open .whatsapp-float {
  display: none !important;
}

.pm-sheet {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pm-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
}

.pm-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 700;
  color: #1b5e20;
  font-family: "Montserrat", sans-serif;
}

.pm-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f2;
  color: #222;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
}

.pm-media {
  background: #111;
}

.pm-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 46dvh;
  background: #0d0d0d;
  overflow: hidden;
}

.pm-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: #0d0d0d;
}

.pm-nav,
.pm-expand {
  position: absolute;
  z-index: 2;
  border: 0;
  cursor: pointer;
}

.pm-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #1b5e20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-nav.prev { left: 8px; }
.pm-nav.next { right: 8px; }

.pm-expand {
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

.pm-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
}

.pm-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px 12px;
  scrollbar-width: none;
}

.pm-thumbs::-webkit-scrollbar {
  display: none;
}

.pm-thumb {
  flex: 0 0 auto;
  width: 66px;
  height: 50px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
  opacity: 0.65;
  cursor: pointer;
}

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

.pm-thumb.is-active {
  opacity: 1;
  border-color: #4caf50;
}

.pm-info {
  padding: 18px 16px 24px;
  color: #222;
  background: #fff;
}

.pm-info h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #1b5e20;
  font-family: "Montserrat", sans-serif;
}

.pm-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.pm-feature {
  background: #f5faf5;
  border: 1px solid #dcecdc;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.pm-feature i {
  display: block;
  margin-bottom: 6px;
  color: #4caf50;
  font-size: 1.1rem;
}

.pm-feature-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.pm-feature-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1b5e20;
  line-height: 1.3;
  word-break: break-word;
}

.pm-about {
  background: #f5faf5;
  border-left: 3px solid #4caf50;
  border-radius: 10px;
  padding: 14px;
}

.pm-about h3 {
  margin-bottom: 8px;
}

.pm-about p {
  margin: 0;
  color: #333 !important;
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: normal;
  overflow: visible;
  max-height: none;
}

.pm-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #e8e8e8;
  background: #fff;
}

.pm-btn {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  cursor: pointer;
}

.pm-btn-call {
  background: #2e7d32;
}

.pm-btn-wa {
  background: #25d366;
}

/* Tam ekran */
.pm-fs {
  position: fixed;
  inset: 0;
  z-index: 210000;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 12px;
}

.pm-fs.is-open {
  display: flex;
}

.pm-fs img {
  max-width: 100%;
  max-height: 85dvh;
  object-fit: contain;
}

.pm-fs-close,
.pm-fs-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}

.pm-fs-close {
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

.pm-fs-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.pm-fs-nav.prev { left: 8px; }
.pm-fs-nav.next { right: 8px; }

.pm-fs-count {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Masaüstü */
@media (min-width: 900px) {
  .pm-overlay {
    align-items: center;
    padding: 28px;
  }

  .pm-sheet {
    width: min(1040px, 100%);
    height: min(820px, 90vh);
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  }

  .pm-top {
    padding: 16px 20px;
  }

  .pm-title {
    font-size: 1.35rem;
  }

  .pm-content {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    overflow: hidden;
  }

  .pm-media {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
  }

  .pm-figure {
    flex: 1 1 auto;
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
    border-radius: 12px;
  }

  .pm-thumbs {
    flex: 0 0 auto;
    padding: 10px 0 0;
  }

  .pm-info {
    overflow-y: auto;
    border-left: 1px solid #eee;
    padding: 22px;
  }

  .pm-about p {
    font-size: 1rem;
  }

  .pm-actions {
    padding: 12px 16px;
  }
}
