﻿
.product-gallery-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.page-left-column {
    width: 80px;
    position: relative; /* İçindeki absolute listeyi burada tutmak için */
    flex-shrink: 0;
}

.page-thumbnails-column {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #cccccc transparent;
}

    .page-thumbnails-column::-webkit-scrollbar {
        width: 6px;
    }

    .page-thumbnails-column::-webkit-scrollbar-thumb {
        background-color: #cccccc;
        border-radius: 10px;
    }

.page-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    box-sizing: border-box;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

    .page-thumbnail-wrapper.active-page-thumb {
        border-color: #f2b83f;
    }

.page-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.page-main-media-area {
    flex: 1;
    position: relative;
    border-radius: 8px;
    background-color: transparent;
}

.page-media-wrapper {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

#pageMainImage, #pageMainVideo {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #333333;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
    z-index: 10;
}

    .nav-btn:hover {
        background: #e0e0e0;
    }

.page-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.modal-nav-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
}

.left-btn {
    left: 15px;
}

.right-btn {
    right: 15px;
}


.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
    pointer-events: none;
}



.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #585858;
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    width: 45px;
    height: 45px;
    font-size: 26px;
    font-weight: bold;
    z-index: 10000;
    background: #ffffff;
    color: #333333;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

    .close-btn:hover {
        background: #e0e0e0;
    }

.modal-layout {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
    gap: 40px;
    justify-content: center;
}


.modal-thumbnails-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    width: 280px;
    flex-shrink: 0;
}

.modal-thumbnails {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #bbbbbb transparent;
}

    .modal-thumbnails::-webkit-scrollbar {
        width: 6px;
    }

    .modal-thumbnails::-webkit-scrollbar-thumb {
        background-color: #bbbbbb;
        border-radius: 10px;
    }

.modal-thumbnail-item-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background-color: #444;
    transition: all 0.2s ease;
}

    .modal-thumbnail-item-wrapper.active-modal-thumb {
        border-color: #ffffff;
    }


    .modal-thumbnail-item-wrapper:nth-child(3n) {
        grid-column: span 2;
        aspect-ratio: 2 / 1;
    }

.modal-thumbnail-item {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-thumbnail-item-wrapper:hover .modal-thumbnail-item,
.modal-thumbnail-item-wrapper.active-modal-thumb .modal-thumbnail-item {
    opacity: 1;
}


.modal-main-view {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: calc(100% - 320px);
}

.modal-media-wrapper {
    position: relative;
    display: inline-block;
}

#expandedModalImage, #expandedModalVideo {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {

    .modal-layout {
        display: block !important;
        padding: 0 !important;
    }

    .modal-main-view {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100% - 100px) !important; 
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    .modal-media-wrapper {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: static !important;
    }


    #expandedModalImage, #expandedModalVideo {
        width: calc(100% - 90px) !important;
        height: 90% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        padding: 0 !important;
        margin: 0 auto !important;
     
    }

    #modalPrevBtn, #modalNextBtn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1000 !important;
        background: rgba(255,255,255,0.8) !important; 
    }

    #modalPrevBtn {
        left: 5px !important;
        right: auto !important;
    }

    #modalNextBtn {
        right: 5px !important;
        left: auto !important;
    }

    .modal-thumbnails-wrapper {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100px !important;
        background-color: #111 !important;
        z-index: 999 !important;
        display: block !important;
    }

    #modalThumbnailsContainer {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 15px 10px !important;
        box-sizing: border-box !important;
        gap: 10px !important;
    }

    .modal-thumbnail-item-wrapper {
        width: 70px !important;
        height: 70px !important;
        flex: 0 0 70px !important;
        margin: 0 !important;
    }


        .modal-thumbnail-item-wrapper:nth-child(3n) {
            aspect-ratio: 1 !important;
            width: 70px !important;
            flex: 0 0 70px !important;
        }
}