.page--gallery .site-main {
    padding: 20px;
    box-sizing: border-box;
}

.gallery-page {
    display: grid;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.gallery-page__intro,
.gallery-section {
    position: relative;
    padding: 24px;
    border: 1px solid rgba(212, 166, 58, 0.12);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(35, 25, 19, 0.97), rgba(19, 14, 11, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 16px 30px rgba(0, 0, 0, 0.12);
}

.gallery-page__eyebrow,
.gallery-section__eyebrow {
    margin: 0 0 8px;
    color: var(--color-accent);
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.gallery-page__title,
.gallery-section__title {
    margin: 0;
    color: var(--color-text);
    font-family: "Cormorant Garamond", Georgia, serif;
    line-height: 0.96;
}

.gallery-page__title {
    font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.gallery-section__title {
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}

.gallery-page__summary,
.gallery-section__summary,
.gallery-section__empty {
    margin: 12px 0 0;
    color: var(--color-text-muted);
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.98rem;
    line-height: 1.65;
}

.gallery-section__head {
    margin-bottom: 18px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.gallery-grid > .gallery-section {
    height: 100%;
}

.gallery-viewer {
    display: grid;
    gap: 14px;
}

.gallery-viewer__hero {
    position: relative;
    width: 100%;
    border: 1px solid rgba(212, 166, 58, 0.14);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.gallery-section--hero .gallery-viewer__hero {
    height: 540px;
    min-height: 540px;
    max-height: 540px;
}

.gallery-grid .gallery-viewer__hero {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
}

.gallery-viewer__hero-open {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.gallery-viewer__hero-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #120d0a;
}

.gallery-viewer__hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #120d0a;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.gallery-viewer__hero-image.is-changing {
    opacity: 0.25;
    transform: scale(1.01);
}

.gallery-viewer__hero-overlay {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.74);
    color: #f8efdc;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.gallery-viewer__hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.82);
    color: #f8efdc;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    opacity: 0.96;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        opacity 180ms ease;
}

.gallery-viewer__hero-nav:hover {
    border-color: rgba(212, 166, 58, 0.38);
    background: rgba(34, 24, 18, 0.92);
    opacity: 1;
}

.gallery-viewer__hero-nav--prev {
    left: 12px;
}

.gallery-viewer__hero-nav--next {
    right: 12px;
}

.gallery-viewer__thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 166, 58, 0.28) rgba(255, 255, 255, 0.04);
    scroll-snap-type: x proximity;
    cursor: grab;
    user-select: none;
}

.gallery-viewer__thumbs.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.gallery-viewer__thumbs::-webkit-scrollbar {
    height: 8px;
}

.gallery-viewer__thumbs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.gallery-viewer__thumbs::-webkit-scrollbar-thumb {
    background: rgba(212, 166, 58, 0.24);
    border-radius: 999px;
}

.gallery-thumb {
    flex: 0 0 auto;
    width: 112px;
    height: 82px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
    opacity: 0.82;
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
    opacity: 1;
    border-color: rgba(212, 166, 58, 0.34);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #120d0a;
    pointer-events: none;
}

.gallery-lightbox {
    position: absolute;
    inset: 0;
    z-index: 40;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: rgba(8, 6, 5, 0.78);
    backdrop-filter: blur(6px);
}

.gallery-lightbox__dialog {
    position: absolute;
    inset: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 64px;
    touch-action: pan-y;
}

.gallery-lightbox__image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    object-fit: contain;
    object-position: center;
    background: #120d0a;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
}

.gallery-lightbox__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.82);
    color: #f8efdc;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(212, 166, 58, 0.24);
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.82);
    color: #f8efdc;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.gallery-lightbox__nav--prev {
    left: 8px;
}

.gallery-lightbox__nav--next {
    right: 8px;
}

@media (max-width: 980px) {
    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gallery-grid > .gallery-section {
        height: auto;
    }
}

@media (max-width: 900px) {
    .page--gallery .site-main {
        padding: 16px;
    }

    .gallery-page__intro,
    .gallery-section {
        padding: 20px;
        border-radius: 18px;
    }

    .gallery-section--hero .gallery-viewer__hero {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }

    .gallery-grid .gallery-viewer__hero {
        height: 260px;
        min-height: 260px;
        max-height: 260px;
    }

    .gallery-thumb {
        width: 96px;
        height: 72px;
        border-radius: 12px;
    }

    .gallery-viewer__hero-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-viewer__hero-nav--prev {
        left: 8px;
    }

    .gallery-viewer__hero-nav--next {
        right: 8px;
    }

    .gallery-lightbox__dialog {
        inset: 12px;
        padding: 12px 48px;
    }

    .gallery-lightbox__backdrop {
        border-radius: 18px;
    }

    .gallery-lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-lightbox__nav--prev {
        left: 4px;
    }

    .gallery-lightbox__nav--next {
        right: 4px;
    }
}