/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

.product-image-grid {
    max-width: 800px;
    margin: 0 auto;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.single-image {
    text-align: center;
}

.single-image .product-image-item img {
    max-width: 100%;
    height: auto;
}

.product-image-item img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Popup overlay */
#image-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

#popup-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 18px;
}

.popup-carousel img {
    max-height: 80vh;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Định dạng nút prev/next của slick */
#image-popup-overlay .slick-prev,
#image-popup-overlay .slick-next {
    width: 40px;
    height: 40px;
    background-color: none; 
    border-radius: 50%;
    z-index: 100;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    transition: background-color 0.3s ease;
}

/* #image-popup-overlay .slick-prev:hover,
#image-popup-overlay .slick-next:hover {
    background-color: rgba(255, 255, 255, 0.5);
} */

#image-popup-overlay .slick-prev {
    left: 20px;
	font-size: 0;
}

#image-popup-overlay .slick-next {
    right: 26px;
	font-size: 0;
}

/* Icon mũi tên (mặc định của slick là không có nội dung, có thể dùng CSS hoặc FontAwesome) */
#image-popup-overlay .slick-prev::before,
#image-popup-overlay .slick-next::before {
    font-family: "slick";
    font-size: 48px;
    color: white;
}

/* Định dạng nút Đóng */
#popup-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 101;
}

#popup-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
    .image-grid {
        display: block !important;
    }

    .mobile-slider .product-image-item {
        padding: 0 10px;
    }

    .mobile-slider .slick-prev {
		left: -20px;
	}
	
	.mobile-slider .slick-next {
		right: -20px;
	}

    .mobile-slider .slick-prev:before, .mobile-slider .slick-next:before {
        color: black;
    }

    #image-popup-overlay .slick-prev {
        left: 0;
    }
    
    #image-popup-overlay .slick-next {
        right: 6px;
    }

    #image-popup-overlay .slick-prev,
    #image-popup-overlay .slick-next {
        width: 30px;
        height: 30px;
        line-height: 30px;
    }

    #image-popup-overlay .slick-prev::before,
    #image-popup-overlay .slick-next::before {
        font-family: "slick";
        font-size: 36px;
        color: black;
    }
}