/* 3D Product Gallery - Frontend Styles */

.tpg-gallery-container {
    display: grid;
    grid-template-columns: 130px 1fr;
    max-width: 500px;
    height: auto;
    background: #fff;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tpg-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 10px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: hidden;
    overflow-x: hidden;
    max-height: 500px;
}

.tpg-thumbnails::-webkit-scrollbar {
    display: none;
}

.tpg-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tpg-thumbnail:hover {
    border-color: #ddd;
    transform: scale(1.05);
}

.tpg-thumbnail.tpg-active {
    border-color: #333;
}

.tpg-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tpg-main-display {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
}

.tpg-main-image-container {
    width: 100%;
    max-width: 700px;
    height: 500px;
    border-radius: 0;
    overflow: hidden; 
    position: relative;
    background: #f0f0f0;
}

.tpg-main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: opacity 0.3s ease;
}

#tpg-viewer-3d {
    width: 100%;
    height: 100%;
    display: none;
}

#tpg-viewer-3d.tpg-active {
    display: block;
}

#tpg-main-image.tpg-active {
    display: block;
}

#tpg-main-image.tpg-hidden {
    display: none;
}

/* 3D Kontrol Butonları */
.tpg-control-btn {
    position: absolute;
    top: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tpg-control-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tpg-control-btn.tpg-active {
    display: flex;
}

#tpg-reset-btn {
    left: 15px;
}

#tpg-play-pause-btn {
    right: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tpg-gallery-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .tpg-thumbnails {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: none;
    }

    .tpg-thumbnail {
        min-width: 100px;
        height: 100px;
        margin-right: 10px;
        margin-bottom: 0;
    }

    .tpg-main-display {
        padding: 20px;
    }

    .tpg-main-image-container {
        height: 300px;
    }
}

/* Loading Animation */
.tpg-loading {
    opacity: 0.5;
}

@keyframes tpgFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tpg-fade-in {
    animation: tpgFadeIn 0.3s ease;
}
