/*==================================================
PHATGIAODESIGNS - PNG LIBRARY
==================================================*/

:root{

    --primary:#b40000;
    --primary-dark:#8d0000;

    --gold:#f6c343;
    --gold-dark:#d7a623;

    --white:#ffffff;
    --text:#2d2d2d;
    --gray:#666666;

    --border:#ececec;

    --bg:#fafafa;

    --radius:14px;

    --shadow:0 10px 30px rgba(0,0,0,.08);

    --transition:.35s;

}


/*==================================================
RESET
==================================================*/

*{

    box-sizing:border-box;

}

img{

    max-width:100%;

    display:block;

}

a{

    text-decoration:none;

    transition:var(--transition);

}

button{

    transition:var(--transition);

}


/*==================================================
WRAPPER
==================================================*/

.png-library{

    width:100%;

    margin:40px auto 60px;

}

.png-container{

    width:100%;

    max-width:1200px;

    margin:auto;

}


/*==================================================
BANNER
==================================================*/

.png-banner{

    width:100%;

    overflow:hidden;

    border-radius:0;

    margin:0 0 35px 0;

    box-shadow:none;

    line-height:0;

}

.png-banner a{

    display:block;

}

.png-banner img{

    display:block;

    width:100%;

    height:auto;

    border-radius:0;

    transition:.4s ease;

}

.png-banner:hover img{

    transform:scale(1.01);

}


/*==================================================
TITLE
==================================================*/

.png-page-title{

    text-align:center;

    margin-bottom:40px;

}

.png-page-title h1{

    margin:0;

    font-size:52px;

    font-weight:800;

    text-transform:uppercase;

    color:var(--primary);

    letter-spacing:2px;

    line-height:1.2;

    text-shadow:

        2px 2px 0 var(--gold),

        5px 5px 12px rgba(0,0,0,.12);

}

.png-page-title span{

    display:block;

    width:180px;

    height:5px;

    margin:20px auto;

    background:linear-gradient(
        90deg,
        var(--gold),
        #ffe69b,
        var(--gold)
    );

    border-radius:30px;

}

.png-page-title p{

    font-size:22px;

    font-weight:700;

    color:#111;

    line-height:1.8;

    max-width:1000px;

    margin:20px auto 35px;

    text-align:center;

}


/*==================================================
INFO BOX
==================================================*/

.png-intro{

    background:#fffdf4;

    border:1px solid #f4d983;

    border-radius:14px;

    padding:25px;

    margin-bottom:40px;

    display:flex;

    justify-content:center;

    gap:50px;

    flex-wrap:wrap;

}

.png-intro-item{

    text-align:center;

}

.png-intro-item h3{

    margin:0;

    color:var(--primary);

    font-size:32px;

    font-weight:700;

}

.png-intro-item p{

    margin-top:8px;

    color:#777;

    font-size:14px;

}


/*==================================================
SEARCH
==================================================*/

.png-search{

    margin:0 auto 40px;

    max-width:850px;

}

.png-search form{

    display:flex;

    gap:15px;

}

.png-search input{

    flex:1;

    height:60px;

    border:2px solid var(--gold);

    border-radius:50px;

    padding:0 25px;

    font-size:16px;

    background:#fff;

    outline:none;

}

.png-search input:focus{

    border-color:var(--primary);

    box-shadow:0 0 20px rgba(180,0,0,.12);

}

.png-search button{

    width:170px;

    border:none;

    border-radius:50px;

    background:var(--primary);

    color:#fff;

    font-weight:700;

    cursor:pointer;

    font-size:15px;

}

.png-search button:hover{

    background:var(--primary-dark);

    transform:translateY(-2px);

}
/*==================================================
HASHTAG
==================================================*/

.png-category{
    position: relative;
    z-index: 999;

    display:flex;

    flex-wrap:wrap;

    justify-content:center;

    gap:12px;

    margin:0 0 45px;

}

.png-category a{
    position: relative;
    z-index: 1000;
    cursor: pointer;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:11px 20px;

    background:#fff8dd;

    border:1px solid #efd06e;

    border-radius:40px;

    color:#b40000;

    font-size:14px;

    font-weight:700;

    transition:.35s;

}

.png-category a span{

    margin-left:6px;

    font-size:12px;

    opacity:.7;

}

.png-category a:hover{

    background:#b40000;

    color:#fff;

    border-color:#b40000;

    transform:translateY(-3px);

    box-shadow:0 8px 18px rgba(180,0,0,.18);

}

.png-category a.active{

    background:#b40000;

    color:#fff;

}


/*==================================================
GRID
==================================================*/

.png-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:28px;

}


/*==================================================
CARD
==================================================*/

.png-item{

    position:relative;

    display:flex;

    flex-direction:column;

    background:#fff;

    border-radius:16px;

    overflow:hidden;

    border:1px solid #ececec;

    box-shadow:0 8px 25px rgba(0,0,0,.05);

    transition:.35s;

}

.png-item:hover{

    transform:translateY(-8px);

    box-shadow:0 18px 40px rgba(0,0,0,.14);

}


/*==================================================
BADGE
==================================================*/

.png-badge{

    position:absolute;

    top:14px;

    left:14px;

    z-index:5;

    padding:6px 12px;

    background:#f6c343;

    color:#fff;

    border-radius:30px;

    font-size:12px;

    font-weight:700;

    letter-spacing:1px;

}


/*==================================================
THUMBNAIL
==================================================*/

.png-thumb{

    position:relative;

    height:250px;

    overflow:hidden;

    display:flex;

    align-items:center;

    justify-content:center;

    background:#fafafa;

}

.png-thumb img{

    width:100%;

    height:100%;

    object-fit:contain;

    transition:.5s;

}

.png-item:hover .png-thumb img{

    transform:scale(1.08);

}


/*==================================================
OVERLAY
==================================================*/

.png-overlay{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.48);
    opacity:0;
    visibility:hidden;
    transition:.35s;
    backdrop-filter:blur(2px);
    z-index:1;

    pointer-events: none; /* 🔥 QUAN TRỌNG */
}
.png-overlay span{

    color:#fff;

    font-size:18px;

    font-weight:700;

}

.png-item:hover .png-overlay{

    opacity:1;
    visibility: visible;  /* thêm */

}


/*==================================================
CONTENT
==================================================*/

.png-content{

    padding:20px;

    display:flex;

    flex-direction:column;

    flex:1;

}

.png-content h3{

    margin:0;

    font-size:20px;

    color:#222;

    line-height:1.45;

    min-height:58px;

}

.png-content p{

    margin:14px 0 18px;

    color:#777;

    font-size:14px;

    line-height:1.8;

    min-height:72px;

}


/*==================================================
TAGS
==================================================*/

.png-tags{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

    margin-bottom:18px;

}

.png-tags a{

    padding:6px 12px;

    border-radius:30px;

    background:#fff8dd;

    border:1px solid #efd06e;

    color:#b40000;

    font-size:12px;

    font-weight:600;

}

.png-tags a:hover{

    background:#b40000;

    color:#fff;

}


/*==================================================
META
==================================================*/

.png-meta{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-top:auto;

    margin-bottom:18px;

    color:#888;

    font-size:13px;

}

.png-meta span{

    display:flex;

    align-items:center;

    gap:6px;

}/*==================================================
DOWNLOAD BUTTON
==================================================*/

.png-footer{

    margin-top:auto;

}

.download-btn{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:12px;

    width:100%;

    height:52px;

    background:#b40000;

    color:#fff;

    border-radius:10px;

    font-size:15px;

    font-weight:700;

    text-decoration:none;

    transition:.35s;

}

.download-btn img{

    width:22px;

    height:22px;

    object-fit:contain;

}

.download-btn:hover{

    background:#8d0000;

    color:#fff;

    transform:translateY(-2px);

    box-shadow:0 12px 24px rgba(180,0,0,.28);

}

.download-btn.disabled{

    background:#d5d5d5;

    color:#666;

    cursor:not-allowed;

}


/*==================================================
EMPTY
==================================================*/

.png-empty{

    grid-column:1/-1;

    text-align:center;

    padding:80px 20px;

}

.png-empty img{

    width:90px;

    margin:0 auto 25px;

}

.png-empty h3{

    margin:0 0 12px;

    color:#b40000;

    font-size:30px;

}

.png-empty p{

    margin:0;

    color:#777;

    line-height:1.8;

}


/*==================================================
PAGINATION
==================================================*/

.png-pagination{

    display:flex;

    justify-content:center;

    align-items:center;

    margin:50px 0;

    gap:8px;

}

.png-pagination .page-numbers{

    width:46px;

    height:46px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:10px;

    border:1px solid #ececec;

    background:#fff;

    color:#444;

    font-weight:700;

    transition:.3s;

}

.png-pagination .page-numbers:hover{

    background:#b40000;

    color:#fff;

    border-color:#b40000;

}

.png-pagination .current{

    background:#b40000;

    color:#fff;

    border-color:#b40000;

}


/*==================================================
SCROLLBAR
==================================================*/

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#f5f5f5;

}

::-webkit-scrollbar-thumb{

    background:#d2d2d2;

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:#b40000;

}


/*==================================================
SELECTION
==================================================*/

::selection{

    background:#b40000;

    color:#fff;

}


/*==================================================
ANIMATION
==================================================*/

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

.png-item{

    animation:fadeUp .45s ease both;

}


/*==================================================
IMAGE EFFECT
==================================================*/

.png-thumb::after{

    content:"";

    position:absolute;

    inset:0;

    background:linear-gradient(

        to top,

        rgba(0,0,0,.08),

        transparent 60%

    );

    pointer-events:none;

}
/*==================================================
TABLET (1200px)
==================================================*/

@media (max-width:1200px){

    .png-grid{

        grid-template-columns:repeat(3,1fr);

        gap:24px;

    }

    .png-page-title h1{

        font-size:46px;

    }

}


/*==================================================
TABLET (992px)
==================================================*/

@media (max-width:992px){

    .png-library{

        margin:25px auto 50px;

    }

    .png-banner{

        margin-bottom:30px;

        border-radius:12px;

    }

    .png-page-title{

        margin-bottom:30px;

    }

    .png-page-title h1{

        font-size:40px;

        letter-spacing:1px;

    }

    .png-page-title p{

        font-size:15px;

        padding:0 20px;

    }

    .png-search{

        max-width:100%;

        padding:0 15px;

    }

    .png-category{

        padding:0 15px;

        justify-content:center;

    }

    .png-grid{

        grid-template-columns:repeat(2,1fr);

        gap:22px;

    }

}


/*==================================================
MOBILE
==================================================*/

@media (max-width:768px){

    .png-page-title{

        padding:10px 15px 25px;

    }

    .png-page-title h1{

        font-size:32px;

        line-height:1.35;

    }

    .png-page-title span{

        width:120px;

        margin:15px auto;

    }

    .png-page-title p{

        font-size:14px;

        line-height:1.8;

    }

    .png-search form{

        flex-direction:column;

    }

    .png-search button{

        width:100%;

        height:52px;

    }

    .png-category{

        gap:8px;

    }

    .png-category a{

        font-size:13px;

        padding:8px 15px;

    }

    .png-grid{

        grid-template-columns:1fr;

        gap:20px;

    }

    .png-thumb{

        height:240px;

    }

    .png-content{

        padding:18px;

    }

    .png-content h3{

        min-height:auto;

        font-size:18px;

    }

    .png-content p{

        min-height:auto;

    }

}


/*==================================================
SMALL MOBILE
==================================================*/

@media (max-width:480px){

    .png-library{

        margin:15px auto 40px;

    }

    .png-banner{

        border-radius:8px;

    }

    .png-page-title h1{

        font-size:26px;

    }

    .png-page-title p{

        font-size:13px;

    }

    .png-category{

        justify-content:flex-start;

        overflow-x:auto;

        flex-wrap:nowrap;

        padding-bottom:8px;

        scrollbar-width:none;

    }

    .png-category::-webkit-scrollbar{

        display:none;

    }

    .png-category a{

        white-space:nowrap;

        flex-shrink:0;

    }

    .download-btn{

        height:48px;

        font-size:14px;

    }

}


/*==================================================
PRINT
==================================================*/

@media print{

    .png-search,

    .png-category,

    .download-btn,

    .png-pagination{

        display:none;

    }
/*==================================================
POPUP
==================================================*/
}
#img-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);

    justify-content: center;
    align-items: center;
}

#img-popup img {
    max-width: 90%;
    max-height: 90%;
}

#img-popup span {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}
/*==================================================
CLICK HASHTAG
==================================================*/
.png-overlay{
    pointer-events: none;
    z-index: 1;   /* thêm dòng này */
}

.png-overlay .preview-btn{
    pointer-events: auto;
}
.png-category{
    position: relative;
    z-index: 999;
}