.urun-galerisi h1 {
    text-align: center;
    font-size: 2.5em;
    color: #333;
    margin-top: 40px;
    margin-bottom: 40px;
}

.urun-konteyner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 1. Izgara (Grid) Yerine Sütun (Columns) Kullanıyoruz --- */
.urun-grid {
    column-width: 280px; /* Her bir sütunun ideal genişliği */
    column-gap: 30px;    /* Sütunlar arasındaki boşluk */
    width: 100%;
}

/* --- 2. Her Bir Fotoğraf Kartının Stili --- */
.urun-karti {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px; /* Kartlar arasında dikey boşluk */
    overflow: hidden;

    /* EN ÖNEMLİ KURAL: Kartın sütunlar arasında bölünmesini engeller */
    break-inside: avoid; 

    /* Hover efektlerini koruyoruz */
    transition: transform 0.3s, box-shadow 0.3s;
}

.urun-karti:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* --- 3. Resim Çerçevesinden SABİT YÜKSEKLİĞİ Kaldırıyoruz --- */
.resim-cerceve {
    width: 100%;
    /* height: 250px; <-- BU SATIR KALDIRILDI! */
    line-height: 0; /* Resim altındaki gizli boşluğu kaldırır */
}

/* --- 4. Resmin Kendi Oranını Korumasını Sağlıyoruz --- */
.resim-cerceve img {
    width: 100%;
    height: auto; /* <-- DEĞİŞTİRİLDİ! Bu, resmin oranını korumasını sağlar. */
    cursor: pointer;
    transition: transform 0.4s ease;
}

.resim-cerceve img:hover {
    transform: scale(1.1);
}

/* --- Bilgi Kısmı Değişmeden Kalıyor --- */
.urun-bilgisi {
    padding: 20px;
    text-align: center;
}

.urun-bilgisi h3 {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    color: #444;
}

.urun-bilgisi p {
    margin: 0;
    color: #777;
    font-size: 0.95em;
}


/* =========================================== */
/* === MOBİL CİHAZLAR İÇİN UYUMLULUK === */
/* =========================================== */

@media (max-width: 650px) {
    .urun-grid {
        /* Daha dar ekranlarda 2 sütuna düşürüyoruz */
        column-width: auto;
        columns: 2;
    }
}

@media (max-width: 450px) {
    .urun-grid {
        /* Çok dar telefon ekranlarında tek sütuna düşürüyoruz */
        columns: 1;
    }
}


/* =========================================== */
/* === MODAL STİLLERİ (Değişiklik Yok) === */
/* =========================================== */
.modal {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.92);
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; opacity: 0; visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.modal.aktif { display: flex; opacity: 1; visibility: visible; }
.modal-content { max-width: 90vw; max-height: 80vh; display: block; animation: zoom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); }
@keyframes zoom { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#caption { margin-top: 15px; color: #ccc; font-size: 1.2em; animation: slideUp 0.5s; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.close:hover { color: #bbb; }
@media (max-width: 768px) {
    .urun-galerisi h1 { overflow-wrap: break-word; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; font-size: 2em; margin-top: 25px; margin-bottom: 25px; }
}