:root {
    /* Tweak to taste */
    --nav-min: 84px;
    --brand: #1c1c1c;
    --brand-ink: #ffffff;
    --gold: #d4a047;
    --ink: #222;
    --page-bg: #faf9f7;
    --container-max: 1200px;

    --btn-ink: #111;
    --btn-bg: var(--gold);
    --btn-bg-hover: #e1b15b;
}

.gallery-section {
    padding: clamp(48px, 8vw, 100px) 0;
    background: #faf8f3;
}
.gallery-header {
    margin-bottom: clamp(16px, 3vw, 24px);
}

/* Carousel layout */
.gallery-carousel {
    --gallery-gap: clamp(10px, 2vw, 16px);
    display: flex;
    align-items: center;
    gap: var(--gallery-gap);
}

.gallery-nav {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.gallery-nav:hover {
    background: #fff;
}
.gallery-nav:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.gallery-nav:disabled {
    opacity: 0.45;
    cursor: default;
}

.gallery-viewport {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.gallery-viewport::-webkit-scrollbar {
    display: none; /* WebKit */
}

.gallery-track {
    display: flex;
    gap: var(--gallery-gap);
    padding: 2px;
}
.gallery-item {
    position: relative;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    scroll-snap-align: start;
    flex: 0 0 calc((100% - (3 * var(--gallery-gap))) / 4);
}
.gallery-item img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.25s ease;
}
.gallery-item:hover img {
    transform: scale(1.03);
}
@media (max-width: 980px) {
    .gallery-item {
        flex-basis: calc((100% - (1 * var(--gallery-gap))) / 2);
    }
}
@media (max-width: 560px) {
    .gallery-carousel {
        gap: 10px;
    }
    .gallery-nav {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
    .gallery-item {
        flex-basis: 100%;
    }
    .gallery-item img {
        height: 240px;
    }
}

/* Lightbox */
.lightbox[hidden] {
    display: none;
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: grid;
    place-items: center;
    z-index: 1002;
    padding: 16px;
}
.lightbox-img {
    max-width: min(1200px, 96vw);
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.lightbox-close:focus-visible {
    outline: 2px solid var(--gold);
}
