/* Genel */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header {
  background: #fff;
  color: #333;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.header .menu a {
  color: #333;
  margin: 0 10px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.header .menu a:hover {
  color: #FF6B81;
}

/* Hero */
.hero {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(90deg, #FF6B81, #FFD3E2);
  color: #fff;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 0;
}

/* Kategoriler ve Ürünler */
.categories, .products {
  padding: 40px 20px;
  text-align: center;
}

.categories h2, .products h2 {
  margin-bottom: 30px;
  font-size: 2rem;
  color: #333;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 20px;
}

/* Kartlar ve Ürünler */
.card, .product {
  background: #fff;
  border: none; /* Dış çizgi kaldırıldı */
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover, .product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
}

/* Footer */
.footer {
  background: #fff;
  color: #333;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 1px solid #ddd;
}

/* Modal */
#modalContent {
  max-width: 90%;
  max-height: 85%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  justify-content: center;
  align-items: center;
}

#modalImg {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

#thumbnailContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow-x: auto;
  margin-bottom: 10px;
}

#thumbnailContainer img {
  height: 60px;
  width: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin: 2px;
  cursor: pointer;
  border: 2px solid #ddd;
  transition: border 0.3s;
}

#thumbnailContainer img:hover,
#thumbnailContainer img.active {
  border-color: #FF6B81;
}

#prevBtn, #nextBtn {
  flex: 1;
  font-size: 1.5rem;
}

/* 1366x768 ve benzeri ekranlar için özel ayarlar */
@media (max-width: 1366px), (max-height: 768px) {
  .container {
    max-width: 1140px;
    padding: 0 20px;
  }

  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .card, .product {
    padding: 15px;
  }

  #modalContent {
    max-width: 80%;
    max-height: 70%;
  }

  #modalImg {
    max-height: 50vh;
  }

  #thumbnailContainer img {
    height: 50px;
    width: 50px;
  }
}

/* Telefonlar için (mobil) */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr; /* Tek sütun */
    gap: 12px;
  }

  .card, .product {
    padding: 10px;
  }

  .product img {
    max-height: 500px; /* Görselleri daha büyük yaptık */
  }

  .product h3 {
    font-size: 0.7rem; /* Ürün başlıklarını küçülttük */
  }

  .categories h2, .products h2 {
    font-size: 1.6rem;
  }

  /* Modal telefon ayarları */
  #modalContent {
    max-width: 95%;
    max-height: 80vh;
    padding: 10px;
  }

  #modalImg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  #thumbnailContainer img {
    height: 50px;
    width: 50px;
    object-fit: cover;
  }
}


#closeModal {
  padding: 10px;            /* Tıklanabilir alan büyür */
  line-height: 1;           /* Hizalamayı bozmamak için */
  background: transparent;  /* Görünür olmasın */
  cursor: pointer;
  z-index: 50;              /* Resmin üstünde kalsın */
}






/* MOBİL MODAL TAŞMA DÜZELTMESİ - YENİ */
@media (max-width: 768px) {
  #modal {
    align-items: flex-start !important;
    padding-top: 10px !important;
  }
  
  #modalContent {
    max-height: 85vh !important;
    max-width: 95vw !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px !important;
  }
  
  #modalImg {
    max-width: 100% !important;
    max-height: 55vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto 10px auto !important;
  }
  
  /* Thumbnail container düzeltmesi */
  #thumbnailContainer {
    max-width: 100% !important;
    overflow-x: auto !important;
    padding-bottom: 5px !important;
    margin-bottom: 5px !important;
    flex-shrink: 0 !important;
  }
  
  #thumbnailContainer img {
    height: 50px !important;
    width: 50px !important;
    flex-shrink: 0 !important;
  }
  
  /* Geçiş butonları görünürlük düzeltmesi */
  #prevBtn, #nextBtn {
    position: relative !important;
    z-index: 1000 !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    margin: 0 5px !important;
  }
  
  /* Modal içindeki buton container'ı */
  #modalContent > div.flex {
    width: 100% !important;
    justify-content: space-between !important;
    position: relative !important;
    z-index: 100 !important;
    margin-top: 5px !important;
  }
}