.gallery {
    position: relative;
}

.gallery__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
    display: none;
}

.gallery__slide {
    flex: 0 0 auto;
    width: 70%;
    scroll-snap-align: start;
}

@media (min-width: 500px) {
    .gallery__slide {
        width: calc((100% - 1rem) / 2);
    }
}

@media (min-width: 720px) {
    .gallery__slide {
        width: calc((100% - 2 * 1rem) / 3);
    }
}

.gallery__image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: rgba(26, 26, 26, 0.55);
    color: var(--color-white-text);
    cursor: pointer;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.gallery__arrow:focus {
    outline: none;
    box-shadow: none;
    background-color: rgba(26, 26, 26, 0.55);
    color: var(--color-white-text);
    border-color: transparent;
}

.gallery__arrow:hover {
    background-color: rgba(26, 26, 26, 0.75);
    color: var(--color-white-text);
    border-color: transparent;
}

.gallery__arrow:focus-visible {
    outline: 2px solid var(--color-white-text);
    outline-offset: 2px;
}

.gallery__arrow[hidden] {
    display: none;
}

.gallery__arrow svg {
    width: 20px;
    height: 20px;
}

.gallery__arrow--prev {
    left: 0.75rem;
}

.gallery__arrow--next {
    right: 0.75rem;
}

.gallery__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: #cfd3d9;
    cursor: pointer;
    transition:
        width 0.2s ease,
        background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.gallery__dot:focus {
    outline: none;
    box-shadow: none;
    border-color: transparent;
}

.gallery__dot:hover {
    background-color: #b0b5bd;
    border-color: transparent;
}

.gallery__dot.is-active {
    width: 22px;
    background-color: var(--color-primary);
}

.gallery__dot.is-active:hover {
    background-color: var(--color-primary);
    border-color: transparent;
}
