/* Genel değişkenler urun-detay.css'den geliyor varsayımı */
/* :root { ... } urun-detay.css içinde olmalı */

/* Galeri İçerik Bölümü */
.gallery-content-section {
    padding: var(--spacing-lg-detail) 0 var(--spacing-xxl-detail);
}
/* Kategori Filtreleri */
.gallery-filters {
    display: flex; flex-wrap: wrap; gap: var(--spacing-md-detail);
    margin-bottom: var(--spacing-xl-detail); justify-content: center;
    padding-bottom: var(--spacing-md-detail); overflow-x: auto;
    scrollbar-width: thin; scrollbar-color: var(--color-border-detail) transparent;
}
.gallery-filters::-webkit-scrollbar { height: 6px; }
.gallery-filters::-webkit-scrollbar-track { background: transparent; }
.gallery-filters::-webkit-scrollbar-thumb { background-color: var(--color-border-detail); border-radius: 10px; }

.filter-button {
    padding: var(--spacing-sm-detail) var(--spacing-lg-detail); font-family: var(--font-heading-detail);
    font-size: 0.9rem; font-weight: 600; color: var(--color-text-secondary-detail);
    background-color: var(--color-surface-detail); border: 1px solid var(--color-border-detail);
    border-radius: var(--border-radius-sm-detail); cursor: pointer; transition: all 0.2s ease;
    white-space: nowrap;
}
.filter-button:hover { background-color: #e9e9e9; border-color: var(--color-secondary-detail); color: var(--color-text-primary-detail); }
.filter-button.active {
    background-color: var(--color-primary-detail); color: var(--color-text-light-detail);
    border-color: var(--color-primary-detail); box-shadow: var(--shadow-sm-detail);
}

/* Galeri Görselleri Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md-detail);
}

/* Her Bir Galeri Öğesi (Resmi saran link) */
.gallery-item {
    position: relative;
    overflow: hidden;
    background: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}
.gallery-item:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.16);
}

.gallery-item img.gallery-main-img {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: 100%;
    object-fit: cover;
    background: transparent;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s, filter 0.3s;
}
.gallery-item img.gallery-main-img:hover {
    transform: scale(1.03);
    filter: brightness(1.08);
}

/* Overlay Stilleri */
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: var(--color-text-light-detail); padding: var(--spacing-md-detail);
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none; display: block;
    z-index: 2;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Mobil Cihazlar İçin Overlay (Tablet ve Telefon) */
@media (max-width: 1024px) {
     .gallery-overlay {
         opacity: 1 !important; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
         padding: var(--spacing-sm-detail);
     }
     .gallery-item:hover .gallery-overlay { opacity: 1 !important; }
     /* Açıklama gizleme kuralını !important ile güçlendirdik */
     .gallery-overlay p { display: none !important; }
     .gallery-overlay h3 { font-size: 0.55rem !important; }
}

/* Sadece Mobil Telefon Boyutları İçin Ek Ayar (isteğe bağlı) */
@media (max-width: 767px) {
     .gallery-overlay h3 { font-size: 0.65rem !important; }
     /* .gallery-item img height'i kaldırıldığı için buradaki mobil height kuralı da kaldırıldı */
     /* .gallery-item img { height: 150px; } */
      .gallery-grid {
         grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Mobil'de daha küçük min genişlik */
         gap: var(--spacing-sm-detail); /* Mobil'de daha az boşluk */
     }
}


.gallery-overlay h3 {
    font-family: var(--font-heading-detail); font-size: 1rem; font-weight: 600;
    margin: 0 0 var(--spacing-xs-detail); line-height: 1.3; max-height: 2.6em;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: white;
}
.gallery-overlay p {
    font-size: 0.85rem; margin: 0; line-height: 1.4; max-height: 2.8em;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: #cccccc;
}


/* Daha Fazla Yükle Butonu Container'ı */
.load-more-container {
    text-align: center; margin-top: var(--spacing-xl-detail);
}

/* Daha Fazla Yükle Butonu Stili (urun-detay.css'deki btn-secondary-action'a benzetildi) */
#load-more-btn {
    padding: 12px 30px; font-family: var(--font-heading-detail);
    font-size: 1rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    border-radius: var(--border-radius-sm-detail); transition: all 0.25s ease; cursor: pointer;
    border: 2px solid var(--color-primary-detail); background-color: transparent;
    color: var(--color-primary-detail); display: inline-flex; /* Buton içeriğini hizala */
    align-items: center; justify-content: center; gap: var(--spacing-sm-detail); /* İçerik arası boşluk */
    line-height: 1.2; text-decoration: none;
    min-width: 180px; /* Yükleme durumunda boyutunun değişmemesi için */
}

#load-more-btn:hover { background-color: rgba(var(--color-primary-detail-rgb, 184, 134, 11), 0.05); border-color: var(--color-primary-dark-detail); color: var(--color-primary-dark-detail); }

/* Buton Disabled Durumu */
#load-more-btn:disabled {
    opacity: 0.6; /* Biraz solgun */
    cursor: not-allowed; /* Yasak imleci */
    background-color: var(--color-surface-detail); /* Gri arka plan */
    border-color: var(--color-border-detail); /* Gri kenarlık */
    color: var(--color-text-secondary-detail); /* Gri metin */
}

/* Yükleme Spinner Stili */
#load-more-btn .loading-spinner {
    margin-left: var(--spacing-sm-detail); /* Metin ile spinner arası boşluk */
     /* Spinner rengi (isteğe bağlı, buton metin rengiyle aynı olabilir) */
    color: inherit; /* Varsayılan olarak butonun text rengini alır */
}

/* "Tüm görseller yüklendi" mesajı stili */
#no-more-items-message {
    text-align: center;
    color: var(--color-text-secondary-detail);
    font-size: 0.95rem;
    margin-top: var(--spacing-md-detail);
    font-weight: 500;
}

.youtube-item {
    position: relative;
    cursor: pointer;
}

.youtube-item .youtube-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #ff0000;
    opacity: 0.9;
    z-index: 10;
    pointer-events: none;
}

.youtube-item:hover .youtube-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-item .gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    background: rgba(0,0,0,0.5);
    z-index: 2;
    pointer-events: none;
}

.youtube-item:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Video Modal Stilleri */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background: #000;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ff0000;
}

/* PhotoSwipe Lightbox Özel Stilleri */
.pswp {
    z-index: 9999;
}

.pswp__bg {
    background-color: rgba(0, 0, 0, 0.9);
}

.pswp__counter {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.pswp__button {
    color: white;
    background: none;
    border: none;
    padding: 0;
    width: 44px;
    height: 44px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    -webkit-appearance: none;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
}

.pswp__button:hover {
    opacity: 0.7;
}

.pswp__button:focus {
    outline: none;
}

.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -4px 0 0 -4px;
}

.pswp__button--arrow--left:before {
    transform: rotate(135deg);
}

.pswp__button--arrow--right:before {
    transform: rotate(-45deg);
}

.pswp__button--close:before,
.pswp__button--close:after {
    content: '';
    display: block;
    width: 2px;
    height: 20px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -1px;
}

.pswp__button--close:before {
    transform: rotate(45deg);
}

.pswp__button--close:after {
    transform: rotate(-45deg);
}

/* Lightbox Caption Stilleri */
.pswp__caption {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    text-align: center;
}

.pswp__caption h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.pswp__caption p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}