/* ============================================================
   Portfolio – Public Styles
   ============================================================ */

:root {
    --pf-bg:        #0d0d06;
    --pf-primary:   #790000;
    --pf-primary-h: #5e0000;
    --pf-white:     #ffffff;
    --pf-radius:    6px;
    --pf-font-main: 'Nunito Sans', sans-serif;
    --pf-font-sub:  'Lora', serif;
}

/* ════════════════════════════════════════
   Gallery wrapper
════════════════════════════════════════ */
.pf-gallery-wrap {
    width: 100%;
    visibility: hidden; /* JS shows after age check */
}
.pf-gallery-wrap.pf-visible { visibility: visible; }

/* ── Grid ── */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pf-grid-item {
    display: none; /* JS controls which items are visible per page */
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--pf-radius);
    cursor: pointer;
    position: relative;
    background: #1a1a12;
}
.pf-grid-item.pf-visible { display: block; }

.pf-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.25s ease;
}
.pf-grid-item:hover img {
    transform: scale(1.06);
    opacity: 0.88;
}

/* ── Pagination ── */
.pf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 8px 0;
}
.pf-page-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-white);
    font-family: var(--pf-font-main);
    font-size: 56px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 12px;
    opacity: 0.7;
}
.pf-page-btn:hover:not(:disabled),
.pf-page-btn:focus:not(:disabled) {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-primary);
    opacity: 1;
}
.pf-page-btn:disabled {
    background: none !important;
    border: none !important;
    color: var(--pf-white);
    cursor: not-allowed;
    opacity: 0.2;
}
.pf-page-info {
    font-family: var(--pf-font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--pf-white);
    min-width: 60px;
    text-align: center;
    margin-bottom: -10px;
}

.pf-no-images {
    font-family: var(--pf-font-sub);
    font-style: italic;
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 40px 0;
}

/* ════════════════════════════════════════
   Age Verification Overlay
════════════════════════════════════════ */
.pf-age-overlay {
    position: fixed;
    inset: 0;
    background: var(--pf-bg);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pf-age-box {
    max-width: 540px;
    width: 100%;
    text-align: center;
}
.pf-age-title {
    font-family: var(--pf-font-main);
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 600;
    color: var(--pf-white);
    margin: 0 0 20px;
    letter-spacing: 0.5px;
}
.pf-age-desc {
    font-family: var(--pf-font-sub);
    font-size: clamp(14px, 2vw, 16px);
    color: rgba(255,255,255,0.7);
    line-height: 1.75;
    margin: 0 0 40px;
}
.pf-age-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.pf-age-btn {
    font-family: var(--pf-font-main);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: var(--pf-radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
    min-width: 200px;
    letter-spacing: 0.3px;
}
.pf-age-btn:active { transform: scale(0.97); }
.pf-age-yes {
    background: var(--pf-primary);
    color: var(--pf-white);
    border: 2px solid var(--pf-primary);
}
.pf-age-yes:hover { background: var(--pf-primary-h); border-color: var(--pf-primary-h); }
.pf-age-no {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: 2px solid rgba(255,255,255,0.3);
}
.pf-age-no:hover {
    border-color: rgba(255,255,255,0.7);
    color: var(--pf-white);
}

/* ════════════════════════════════════════
   Lightbox
════════════════════════════════════════ */
.pf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
}
.pf-lightbox.pf-lb-open { display: flex; }

/* Image wrap */
.pf-lb-img-wrap {
    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    border-radius: 4px;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Close button – top right */
.pf-lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-white);
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
    line-height: 1;
    opacity: 0.8;
    padding: 0;
}
.pf-lb-close:hover,
.pf-lb-close:focus {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-primary);
    opacity: 1;
}
/* Desktop counter – top left */
.pf-lb-counter-desktop {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: var(--pf-font-main);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.4);
    padding: 8px 14px;
    border-radius: 20px;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Desktop arrows – sides */
.pf-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-white);
    width: 56px;
    height: 56px;
    font-size: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
.pf-lb-arrow:hover,
.pf-lb-arrow:focus {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--pf-primary);
    opacity: 1;
}
.pf-lb-prev { left: 24px; }
.pf-lb-next { right: 24px; }

/* Mobile bottom bar – hidden on desktop */
.pf-lb-mobile-bar { display: none; }

/* ════════════════════════════════════════
   Mobile Responsive
════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Gallery: 2 cols */
    .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* Lightbox mobile layout */
    .pf-lightbox { flex-direction: column; align-items: stretch; }

    .pf-lb-img-wrap {
        flex: 1;
        max-width: 100vw;
        max-height: calc(100vh - 130px);
        padding: 60px 12px 0;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .pf-lb-img {
        max-width: 100%;
        max-height: calc(100vh - 130px);
        object-fit: contain;
    }

    /* Hide desktop arrows & counter */
    .pf-lb-arrow { display: none; }
    .pf-lb-counter-desktop { display: none; }

    /* Mobile bottom bar */
    .pf-lb-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 16px 20px;
        height: 80px;
        flex-shrink: 0;
        background: transparent;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .pf-lb-arrow-m {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--pf-white);
        width: 50px;
        height: 50px;
        font-size: 36px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s;
        line-height: 1;
        padding: 0;
        opacity: 0.7;
    }
    .pf-lb-arrow-m:hover,
    .pf-lb-arrow-m:focus {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--pf-primary);
        opacity: 1;
    }
    .pf-lb-counter-m {
        font-family: var(--pf-font-main);
        font-size: 14px;
        font-weight: 600;
        color: rgba(255,255,255,0.8);
        min-width: 80px;
        text-align: center;
        margin-bottom: -8px;
    }

    /* Close stays top-right on mobile */
    .pf-lb-close { top: 14px; right: 14px; font-size: 22px; }

    /* Age btns vertical on mobile */
    .pf-age-btns { flex-direction: column; align-items: center; }
    .pf-age-btn { min-width: 260px; }
}

/* ════════════════════════════════════════
   Category Box
════════════════════════════════════════ */
.pf-cat-box-wrap {
    display: inline-block;
    width: 100%;
}
.pf-cat-box {
    display: block;
    text-decoration: none;
    width: 100%;
}
.pf-cat-box-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--pf-radius);
    background: #1a1a12;
}
.pf-cat-box-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.pf-cat-box:hover .pf-cat-box-img img {
    transform: scale(1.06);
}
.pf-cat-box-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a12;
}
.pf-cat-box-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 55%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s ease;
}
.pf-cat-box:hover .pf-cat-box-overlay {
    background: linear-gradient(to top, rgba(121,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
}
.pf-cat-box-name {
    font-family: var(--pf-font-main);
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 600;
    color: var(--pf-white);
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
