 /* Popup Overlay */
        .km-popup-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .6);
            backdrop-filter: blur(1.5px);
            z-index: 99998;
            display: none;
        }

        /* Popup Box */
        .km-popup {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 99999;
            padding: 20px;
        }

        .km-popup-card {
            position: relative;
            max-width: min(95vw, 680px);
            width: 100%;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
            background: #fff;
            /* กันเงาโปร่งหลังรูป */
            transform: scale(.96);
            opacity: 0;
            transition: transform .2s ease, opacity .2s ease;
        }

        .km-popup.show .km-popup-card {
            transform: scale(1);
            opacity: 1;
        }

        .km-popup-img {
            display: block;
            width: 100%;
            height: auto;
        }

        /* ปุ่มปิด */
        .km-popup-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            border: 0;
            border-radius: 999px;
            background: rgba(0, 0, 0, .6);
            color: #fff;
            font-size: 20px;
            line-height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: opacity .15s ease;
        }

        .km-popup-close:hover {
            opacity: .85;
        }

        /* เมื่อเปิด popup ให้ล็อกสกอร์ล */
        body.km-popup-open {
            overflow: hidden;
        }