.gallery-page {
    background: #fff;
    color: #171717;
}

.gallery-page__shell {
    width: min(920px, calc(100% - 32px));
    margin-inline: auto;
}

.gallery-page__shell--wide {
    width: min(1010px, calc(100% - 32px));
}

.gallery-page__masthead {
    border-top: 1px solid #ececec;
    background: #f5f5f5;
    padding: 1.65rem 0 1.35rem;
    text-align: center;
}

.gallery-page__masthead h1 {
    margin: 0;
    color: #050505;
    font-family: var(--font-body);
    font-size: clamp(1.55rem, 2.9vw, 2.35rem);
    font-weight: 900;
    line-height: 1.1;
}

.gallery-page__masthead h1 span {
    color: rgb(var(--brand));
}

.gallery-page__breadcrumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    margin-top: 0.8rem;
    color: #a0a0a0;
    font-size: 0.74rem;
}

.gallery-page__breadcrumb a {
    color: #a0a0a0;
    text-decoration: none;
}

.gallery-page__breadcrumb a:hover,
.gallery-page__breadcrumb span:last-child {
    color: rgb(var(--brand));
}

.gallery-page__section {
    padding: 1.2rem 0 4.5rem;
}

.gallery-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.85rem;
}

.gallery-page__card {
    min-width: 0;
}

.gallery-page__card-link {
    display: grid;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.gallery-page__card-media {
    display: block;
    overflow: hidden;
    background: #f1f1f1;
    aspect-ratio: 0.97;
}

.gallery-page__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.gallery-page__card-link:hover .gallery-page__card-media img {
    transform: scale(1.035);
}

.gallery-page__card-title {
    color: rgb(var(--brand));
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}

.gallery-page__empty {
    grid-column: 1 / -1;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
    padding: 3rem 1.5rem;
    color: #5b6472;
    text-align: center;
    font-weight: 700;
}

.gallery-detail__section {
    padding: 0.75rem 0 4.5rem;
}

.gallery-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 1.25rem;
    align-items: start;
}

.gallery-detail__main {
    min-width: 0;
}

.gallery-detail__stage {
    overflow: hidden;
    background: #f1f1f1;
    aspect-ratio: 1.38;
}

.gallery-detail__stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-detail__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.gallery-detail__thumb {
    display: block;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f1f1f1;
    padding: 0;
    aspect-ratio: 1.45;
    cursor: pointer;
}

.gallery-detail__thumb.is-active {
    border-color: rgb(var(--brand));
}

.gallery-detail__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-detail__sidebar {
    border-left: 1px solid #eeeeee;
    padding-left: 1.25rem;
}

.gallery-detail__sidebar h2 {
    margin: 0 0 0.8rem;
    color: #171717;
    font-size: 0.75rem;
    font-weight: 900;
}

.gallery-detail__sidebar h2 span {
    color: rgb(var(--brand));
}

.gallery-detail__nav {
    display: grid;
}

.gallery-detail__nav a {
    border-bottom: 1px solid #dddddd;
    padding: 0.7rem 0.55rem;
    color: #888888;
    text-decoration: none;
    font-size: 0.72rem;
    line-height: 1.35;
}

.gallery-detail__nav a:hover,
.gallery-detail__nav a.is-active {
    background: rgb(var(--brand));
    color: #fff;
    font-weight: 800;
}

@media (max-width: 767px) {
    .gallery-page__grid {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }

    .gallery-page__card-media {
        aspect-ratio: 1.25;
    }

    .gallery-detail__layout {
        grid-template-columns: 1fr;
    }

    .gallery-detail__sidebar {
        border-left: 0;
        border-top: 1px solid #eeeeee;
        padding-top: 1.2rem;
        padding-left: 0;
    }

    .gallery-detail__thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }
}
