/* overlay เต็มจอ */
#ph-popup {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

/* กล่อง popup */
.ph-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 900px;   /* คุมไม่ให้ใหญ่เกินบนจอใหญ่ */
    border-radius: 12px;
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}

/* ปุ่มปิด */
#ph-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 40px;
    height: 40px;

    background: rgba(0, 0, 0, 0.7);
    color: #fff;

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: bold;
    cursor: pointer;

    transition: all 0.2s ease;
    z-index: 9999;
}

/* hover */
#ph-close:hover {
    background: #ff3b3b;
    transform: scale(1.1);
}

/* mobile ปรับให้ใหญ่ขึ้น */
@media (max-width: 768px) {
    #ph-close {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

/* รูปเต็มพื้นที่ */
.ph-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}