html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.product-detail-container {
  margin: 20px;
  display: flex;
  gap: 40px; /* foto + detay arası boşluk */
  align-items: flex-start;
  box-sizing: border-box;
}

/* GALLERY */
.product-gallery {
  flex: 0 0 520px; /* foto alanı sabit genişlik */
}

.main-image {
  display: flex;
}

.main-image img {
  width: 100%;
  max-width: 520px; /* 👈 kritik satır */
  height: auto;
  object-fit: contain;
  display: block;
}

.thumbnail-list {
  border-radius: 10px;
  margin-top: 10px;
  width: 100%;
  max-width: 520px; /* foto ile aynı */
  display: flex;
  justify-content: center;
}

.thumbnail-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #ddd;
}

.thumbnail-list img:hover {
  border-color: #333;
}

/* INFO */
.product-details {
  flex: 1; /* kalan alanı kaplasın */
}

.product-details h1 {
  margin-bottom: 35px;
}

.product-details p {
  margin: 8px 0;
  margin-bottom: 20px;
  color: gray;
}

.description {
  margin-top: 20px;
  line-height: 1.6;
}

.add-btn-product-detail {
  padding: 15px;
  width: auto;
  background: #0a2540;
  color: white;
  border-radius: 3px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .product-details h1 {
    margin-bottom: 20px;
  }

  .product-details p {
    margin-bottom: 5px;
  }

  .product-detail-container {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  .add-btn-product-detail {
    width: auto;
  }

  .product-detail-container {
    flex-direction: column;
  }

  .product-gallery {
    flex: 1;
    width: 100%;
  }

  .main-image {
    justify-content: center;
  }

  .main-image img {
    max-width: 100%;
    width: 100%;
  }

  .thumbnail-list {
    max-width: 100%;
  }

  .product-details {
    flex: 1;
  }
}
