.site-header {
    flex: 0 0 auto;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.gallery {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.thumbnail-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    z-index: 4000;
    box-sizing: border-box;
}

.thumbnail-strip {
    position: relative;
    width: 90vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 2000;
}

.thumbnail-strip::before,
.thumbnail-strip::after {
    content: "";
    position: absolute;
    top: 0;
    width: 2rem;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}

.thumbnail-strip::before {
    left: 0;
    background: linear-gradient(to right, #111, transparent);
    z-index: 2000;
}
.
thumbnail-strip::after {
    right: 0;
    background: linear-gradient(to left, #111, transparent);
    z-index: 2000;
}

/* Scrollable thumbnail gallery inside */
.thumbnail-strip .thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: auto;
    padding: 0.5rem 0;
    box-sizing: border-box;
    margin: 0 auto;
    z-index: 2000;
}

/* Individual thumbnail images */
.thumbnail-strip .thumbnails img {
    height: 115px;
    width: auto;
    max-width: 138px;
    object-fit: cover;
    flex-shrink: 0;
	cursor: pointer;
    z-index: 2000;
}

.thumbnail-strip .thumbnails img.selected {
    border: 3px solid #ffcc00;
    border-radius: 4px;
    box-shadow: 0 0 6px #ffcc00;
	cursor: pointer;
    z-index: 2000;
}

.thumbnail-strip .thumbnails::-webkit-scrollbar {
    display: none;
}

.main-image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
}

.main-image-popup.active {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
}

.popup-content {
    position: relative;
    max-width: 80vw;
    height: 60vh;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
	margin-bottom: 5rem;
    z-index: 3000;
}

.image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 3000;
}

#displayed-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border: 4px solid #ffcc00;
    border-radius: 7px;
    z-index: 3000;
}

/* Navigation arrows for main image */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    background: rgba(0, 0, 0, 0);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    user-select: none;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 3000;
}

.nav-arrow:hover {
    opacity: 1;
    z-index: 3000;
}

.left-arrow {
    left: -4.5rem;
    z-index: 3000;
}

.right-arrow {
    right: -4.5rem;
    z-index: 3000;
}

/* Navigation arrows for thumbnail strip */
.thumb-left-arrow,
.thumb-right-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0);
    padding: 0.5rem 1rem;
    cursor: pointer;
    user-select: none;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 3000;
}

.thumb-left-arrow {
    left: 0.5rem;
    z-index: 3000;
}

.thumb-right-arrow {
    right: 0.5rem;
    z-index: 3000;
}

.thumb-left-arrow:hover,
.thumb-right-arrow:hover {
    opacity: 1;
    z-index: 3000;
}
