.gallery-wrapper.home-gallery {
    height: auto;
    padding: 32px 15px;
    overflow: visible;
}

.home-gallery__viewport {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #ff7449 #e6e8eb;
}

.home-gallery__viewport:focus-visible,
.home-gallery__controls button:focus-visible {
    outline: 2px solid #c64622;
    outline-offset: 4px;
}

.home-gallery__list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.home-gallery__item {
    min-width: 0;
    scroll-snap-align: start;
}

.home-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 22 / 13;
    object-fit: contain;
    border-radius: 6px;
    background: #f6f7f9;
}

.home-gallery__caption {
    padding: 12px 0;
    color: #1c2129;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.home-gallery__controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.home-gallery__controls[hidden] {
    display: none;
}

.home-gallery__controls button {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #ff7449;
    color: #1c2129;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 991px) {
    .home-gallery__list {
        grid-auto-columns: calc((100% - 16px) / 2);
    }
}

@media (max-width: 575px) {
    .home-gallery__list {
        grid-auto-columns: 100%;
    }
}
