html.pgp-fullscreen-mode,
html.pgp-fullscreen-mode body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 100% !important;
    background: #f4ead8 !important;
    overflow: hidden !important;
}

html.pgp-fullscreen-mode #wpadminbar,
html.pgp-fullscreen-mode header,
html.pgp-fullscreen-mode footer,
html.pgp-fullscreen-mode #masthead,
html.pgp-fullscreen-mode #colophon,
html.pgp-fullscreen-mode .site-header,
html.pgp-fullscreen-mode .site-footer,
html.pgp-fullscreen-mode .elementor-location-header,
html.pgp-fullscreen-mode .elementor-location-footer,
html.pgp-fullscreen-mode .wp-site-blocks > header,
html.pgp-fullscreen-mode .wp-site-blocks > footer {
    display: none !important;
}

html.pgp-fullscreen-mode {
    margin-top: 0 !important;
}

body.pgp-fullscreen-mode {
    font-family: Peyda, Tahoma, Arial, sans-serif !important;
}

.pgp-gallery-shell,
.pgp-gallery-shell * {
    box-sizing: border-box;
}

.pgp-gallery-shell {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    z-index: 2147483000;
    overflow-y: auto;
    overflow-x: hidden;
    direction: rtl;
    background:
        radial-gradient(circle at 10% 10%, rgba(122, 78, 43, 0.12), transparent 28%),
        radial-gradient(circle at 90% 92%, rgba(122, 78, 43, 0.10), transparent 34%),
        #f4ead8;
    color: #2b160c;
    font-family: Peyda, Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.pgp-gallery-page {
    width: min(1440px, calc(100vw - 96px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 42px 0 48px;
}

.pgp-gallery-title {
    margin: 0 0 34px;
    text-align: center;
    font-size: clamp(26px, 3.6vw, 44px);
    line-height: 1.35;
    font-weight: 800;
    color: #3b1d0e;
    letter-spacing: -0.5px;
}

.pgp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    transition: opacity 220ms ease, transform 220ms ease;
}

.pgp-gallery-grid.is-changing {
    opacity: 0;
    transform: translateY(12px);
}

.pgp-gallery-card {
    margin: 0;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: #fff7e8;
    border: 1px solid rgba(91, 47, 22, 0.13);
    box-shadow: 0 16px 40px rgba(60, 29, 12, 0.12);
    transform: translateY(0);
    animation: pgpCardFadeUp 420ms ease both;
}

.pgp-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.pgp-gallery-card[hidden] {
    display: none !important;
}

.pgp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 30px;
}

.pgp-pagination button {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #3a1b0c;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 8px 22px rgba(60, 29, 12, 0.10);
    font-family: Peyda, Tahoma, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.pgp-pagination button:hover,
.pgp-pagination button:focus-visible {
    transform: translateY(-2px);
    outline: none;
    background: #efd3a9;
}

.pgp-pagination button.is-active {
    background: linear-gradient(135deg, #6c3518, #3a190b);
    color: #fff3dc;
}

.pgp-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.pgp-public-empty {
    width: min(620px, 100%);
    margin: 40px auto 0;
    padding: 26px 22px;
    border-radius: 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.58);
    color: #4d2814;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 14px 34px rgba(60, 29, 12, 0.10);
}

@keyframes pgpCardFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .pgp-gallery-page {
        width: min(720px, calc(100% - 30px));
    }

    .pgp-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 640px) {
    html.pgp-fullscreen-mode,
    html.pgp-fullscreen-mode body {
        overflow: hidden !important;
    }

    .pgp-gallery-page {
        width: min(430px, calc(100% - 28px));
        padding: 26px 0 32px;
    }

    .pgp-gallery-title {
        margin-bottom: 22px;
        font-size: 28px;
    }

    .pgp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .pgp-gallery-card {
        border-radius: 22px;
        aspect-ratio: 16 / 9;
    }

    .pgp-pagination {
        margin-top: 24px;
    }
}
