/* Frontend Gallery Stilleri */

/* ==========================================================================
   E-TİCARET TARZI GALERİ
   ========================================================================== */

.cgf-ecommerce-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Ana büyük görsel container */
.cgf-main-image-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.cgf-main-image-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgf-main-image-wrapper:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cgf-main-image-wrapper {
    aspect-ratio: 1 / 1;
}

#cgf-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgf-main-image-wrapper:hover #cgf-main-image {
    transform: scale(1.05);
}

/* Zoom ikonu */
.cgf-zoom-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cgf-main-image-wrapper:hover .cgf-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.cgf-zoom-icon svg {
    width: 24px;
    height: 24px;
}

/* Ana görsel caption */
.cgf-main-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    backdrop-filter: blur(10px);
    color: white;
    padding: 40px 24px 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgf-main-image-wrapper:hover .cgf-main-image-caption {
    transform: translateY(0);
}

.cgf-caption-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.cgf-caption-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Thumbnail container */
.cgf-thumbnails-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.cgf-thumbnails-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    padding: 0 40px;
    max-width: 100%;
    overflow: hidden;
}

.cgf-thumbnail-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.cgf-thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.cgf-thumbnail-item.active {
    border-color: #007cba;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    transform: translateY(-2px);
}

.cgf-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.cgf-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cgf-thumbnail-item:hover .cgf-thumbnail-overlay {
    opacity: 1;
}

.cgf-thumbnail-item.active .cgf-thumbnail-overlay {
    opacity: 0;
}

/* Thumbnail navigasyon */
.cgf-thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.cgf-thumbnail-nav:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.cgf-thumbnail-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.cgf-nav-prev {
    left: 8px;
}

.cgf-nav-next {
    right: 8px;
}

/* ==========================================================================
   GRID TARZI GALERİ (ESKİ YÖNTEM)
   ========================================================================== */

.cgf-grid-gallery {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}

/* Sütun sayıları */
.cgf-grid-gallery.cgf-columns-1 {
    grid-template-columns: 1fr;
}

.cgf-grid-gallery.cgf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cgf-grid-gallery.cgf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cgf-grid-gallery.cgf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.cgf-grid-gallery.cgf-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.cgf-grid-gallery.cgf-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.cgf-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cgf-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.cgf-gallery-item-inner {
    position: relative;
    height: 100%;
}

.cgf-gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgf-gallery-item:hover img {
    transform: scale(1.05);
}

.cgf-lightbox-link {
    display: block;
    position: relative;
}

.cgf-grid-zoom-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.cgf-gallery-item:hover .cgf-grid-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.cgf-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    backdrop-filter: blur(10px);
    color: white;
    padding: 32px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgf-gallery-item:hover .cgf-gallery-caption {
    transform: translateY(0);
}

.cgf-gallery-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.cgf-gallery-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

/* ==========================================================================
   LIGHTBOX STİLLERİ - DEVRE DIŞI (ELEMENTOR LIGHTBOX KULLANILIYOR)
   ========================================================================== */

/* Kendi lightbox'ımız devre dışı - Elementor'ün lightbox'ı kullanılıyor */
.cgf-lightbox-overlay {
    display: none !important;
}

.cgf-lightbox-content {
    display: none !important;
}

.cgf-lightbox-image {
    display: none !important;
}

.cgf-lightbox-close {
    display: none !important;
}

.cgf-lightbox-nav {
    display: none !important;
}

.cgf-lightbox-prev {
    display: none !important;
}

.cgf-lightbox-next {
    display: none !important;
}

.cgf-lightbox-caption {
    display: none !important;
}

/* ==========================================================================
   RESPONSİVE TASARIM
   ========================================================================== */

@media (max-width: 768px) {
    .cgf-ecommerce-gallery {
        gap: 16px;
    }
    
    #cgf-main-image {
        height: 300px;
    }
    
    .cgf-thumbnails-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 0 20px;
    }
    
    .cgf-thumbnail-nav {
        width: 32px;
        height: 32px;
    }
    
    .cgf-nav-prev {
        left: 4px;
    }
    
    .cgf-nav-next {
        right: 4px;
    }
    
    .cgf-grid-gallery.cgf-columns-3,
    .cgf-grid-gallery.cgf-columns-4,
    .cgf-grid-gallery.cgf-columns-5,
    .cgf-grid-gallery.cgf-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cgf-gallery-item img {
        height: 180px;
    }
    
    .cgf-lightbox-nav {
        display: none;
    }
    
    .cgf-lightbox-close {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        width: 44px;
        height: 44px;
    }
    
    .cgf-lightbox-caption {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .cgf-ecommerce-gallery {
        margin: 16px 0;
    }
    
    #cgf-main-image {
        height: 250px;
    }
    
    .cgf-thumbnails-wrapper {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 16px;
    }
    
    .cgf-grid-gallery.cgf-columns-2,
    .cgf-grid-gallery.cgf-columns-3,
    .cgf-grid-gallery.cgf-columns-4,
    .cgf-grid-gallery.cgf-columns-5,
    .cgf-grid-gallery.cgf-columns-6 {
        grid-template-columns: 1fr;
    }
    
    .cgf-gallery-item img {
        height: 200px;
    }
    
    .cgf-grid-gallery {
        gap: 12px;
    }
    
    .cgf-main-image-caption,
    .cgf-gallery-caption {
        padding: 20px 16px 16px;
    }
    
    .cgf-caption-title,
    .cgf-gallery-title {
        font-size: 16px;
    }
    
    .cgf-caption-description,
    .cgf-gallery-description {
        font-size: 14px;
    }
}

/* ==========================================================================
   ANİMASYONLAR VE GEÇIŞLER
   ========================================================================== */

@keyframes cgf-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cgf-gallery-item,
.cgf-thumbnail-item {
    animation: cgf-fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cgf-thumbnail-item:nth-child(1) { animation-delay: 0ms; }
.cgf-thumbnail-item:nth-child(2) { animation-delay: 100ms; }
.cgf-thumbnail-item:nth-child(3) { animation-delay: 200ms; }
.cgf-thumbnail-item:nth-child(4) { animation-delay: 300ms; }
.cgf-thumbnail-item:nth-child(5) { animation-delay: 400ms; }

/* ==========================================================================
   YAZDIRMA MEDYASI
   ========================================================================== */

@media print {
    .cgf-gallery-caption,
    .cgf-main-image-caption {
        position: static;
        background: none;
        color: black;
        transform: none;
        padding: 10px 0;
    }
    
    .cgf-gallery-item:hover .cgf-gallery-caption,
    .cgf-main-image-wrapper:hover .cgf-main-image-caption {
        transform: none;
    }
    
    .cgf-zoom-icon,
    .cgf-grid-zoom-icon,
    .cgf-thumbnail-nav {
        display: none;
    }
    
    .cgf-thumbnails-container {
        display: none;
    }
}