
/* FULLSCREEN VIEWER OVERRIDES BELOW */
#main-images-container {
    display: grid;
	grid-template-columns: 1fr 1fr;
	position: relative;
	gap: 10px;
    cursor: pointer;
	width: 100%;
    min-height: 400px;
}
#main-images-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
    aspect-ratio: 16 / 9;
    transition: opacity 0.2s;
}
#main-images-container img:hover {
    opacity: 0.7;
}

.fullscreen-viewer {
    font-family: system-ui;
}
.fullscreen-viewer svg {
    width: 46px;
    height: 46px;
}

.fullscreen-viewer .nav-btn {
	display: flex;
}

.fullscreen-viewer-img_preview {
	position: fixed;
	z-index: 1000;
	top: 0;
	left: 0;
	background-color: white;
	height: 100%;
	width: 100%;
	transition: transform 0.3s, opacity 0.3s;
	transform: translateY(100%);
	opacity: 0;
}

/* header area */
.fullscreen-viewer-img_preview .preview-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	color: #000000;
	position: sticky;
	top: 0;
	z-index: 3;
	height: 60px;
}

/* title */
.fullscreen-viewer-img_preview .preview-title {
	font-size: 28px;
	font-weight: 600;
}

/* close button */
.fullscreen-viewer-img_preview .preview-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}


/* replace only the grid rules */
.fullscreen-viewer-img_preview .preview-row {
	display: grid;
	width: calc(100% - 30px);
	margin: 15px auto;
	max-width: 1000px;
	gap: 15px;
	padding-bottom: 0;
}

.fullscreen-viewer-img_preview img {
	cursor: pointer;
    width: 100%;
	height: 100%;
	aspect-ratio: 1.4;
	object-fit: cover;
}

.fullscreen-viewer-img_preview img:hover {
	opacity: 0.7;
}


@media (max-width: 768px) {
    #main-images-container { 
        grid-template-columns: 1fr;
    }

    #main-images-container img:nth-child(2) {
        display: none;
    }
}

/* FULL SCREEN IMAGE VIEWER */

.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
    /* Prevent text/image selection */
    -webkit-user-drag: none;
    /* Disable default drag behavior */
}

.viewer-content {
    height: calc(100% - 60px);
    display: flex;
    width: 100%;
    justify-content: center;
}

.viewer-header {
    height: 60px;
    z-index: 1010;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: rgba(0, 0, 0, 0.5);
}

.viewer-footer {
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    display: none;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    z-index: 1010;
}

#prev-btn {
    left: 20px;
    cursor: pointer;
}

#next-btn {
    right: 20px;
    cursor: pointer;
}

#close-viewer {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

#fullscreen-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    /* Prevent text/image selection */
    -webkit-user-drag: none;
    /* Disable default drag behavior */
}

.fullscreen-image-count {
    color: white;
    position: absolute;
    left: 20px;
    font-size: 20px;
}

.image-container {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    position: relative;
    justify-content: center;
    /* Align the images */
    align-items: center;
    transition: transform 0.5s ease-in-out;
    /* Smooth slide transition */
}

.image-container img {
    flex: 0 0 100%;
    /* Each image takes up full width of the container */
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    /* Prevent text/image selection */
    -webkit-user-drag: none;
    /* Disable default drag behavior */
    position: relative;
}

.main-product-image-container {
    height: 400px;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}


@media (max-width: 1000px) {
    #main-images-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {

    #main-images-container {
    	min-height: 200px;
    }

    #prev-btn,
    #next-btn {
        bottom: 0;
        top: unset;
        transform: unset;
        height: 50px;
        font-size: 2rem;
        padding: 0;
    }

    #fullscreen-viewer {
        justify-content: flex-start;
    }


    .viewer-content {
        height: calc(100% - 100px);
    }

    .viewer-header {
        height: 50px;
    }

    #close-viewer {
        font-size: 2rem;
    }

    .fullscreen-image-count {
        font-size: 16px;
    }

    .viewer-footer {
        display: unset;
    }
}

#preview-rows-container {
    overflow-y: auto;
	height: calc(100vh - 92px);
}