
        /* popup */
        #photoPopup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 99999999999990999;
        }

        #photoPopupContent {
            position: relative;
            max-width: 80%;
            max-height: 80%;
        }

        #photoPopupContent img {
            width: 100%;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 10px;
            opacity: 0;
            transition: opacity .45s ease;
        }

        #photoPopupContent img.show {
            opacity: 1;
        }

        .popup-btn {
            position: absolute;
            top: 40%;
            transform: translateY(-50%);
            font-size: 30px;
            color: #fff;
            border: none;
            cursor: pointer;
            padding: 10px;
            margin: 0 30px;
            border-radius: 50%;
            background-color: transparent;
        }

        #prevBtn {
            left: -50px;
        }

        #nextBtn {
            right: -50px;
        }

        .popup-btn {
            text-shadow: 0 0 2px rgba(0, 0, 0, 0);
            /* ép Safari không vẽ baseline */
            -webkit-font-smoothing: antialiased;
            -webkit-transform: translateZ(0);
            /* ép GPU render để tránh đường viền */
        }


        #prevBtn,
        #nextBtn {
            background-image: none !important;
            border: none !important;
        }

        @supports (-webkit-touch-callout: none) {
            .popup-btn::after {
                content: '';
                display: none !important;
            }
        }

        /* Close button */
        #closePopup {
            position: absolute;
            top: -50px;
            right: -20px;
            font-size: 30px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            padding: 5px 10px;
            background: transparent;
            color: #ffffff;
        }

        .ClassClosePopup {
            color: #ffffff !important;
        }

        /* Strong reset for iOS Safari and overrides */
        #closePopup,
        .popup-btn {
            -webkit-appearance: none;
            appearance: none;
            -webkit-user-select: none;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            background: transparent !important;
            border: none !important;
            color: #fff !important;
            opacity: 1 !important;
            -webkit-text-fill-color: #fff !important;
            /* important for iOS */
            text-shadow: 0 0 0 #fff;
            /* force render color */
            filter: none !important;
        }

        #closePopup:focus {
            outline: none;
            box-shadow: none;
        }

        /* make sure popup content doesn't block swipes unintentionally */
        #photoPopupContent {
            touch-action: pan-y;
        }
    