.customer-gallery {
    padding: 50px 0;
    overflow: hidden;
}

.customer-gallery__inner {
    position: relative;
}

.customer-gallery__heading {
    max-width: 620px;
    margin: 0 auto 30px;
    padding: 0 20px;
    text-align: center;
}

.customer-gallery__title {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
}

.customer-gallery__subtitle {
    margin: 12px 0 0;
    color: var(--accent, #607985);
    font-size: 15px;
    line-height: 1.6;
}

.customer-gallery__carousel {
    position: relative;
}

.customer-gallery__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;
    -ms-overflow-style: none;

    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;

    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.customer-gallery__viewport::-webkit-scrollbar {
    display: none;
}

.customer-gallery__viewport.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.customer-gallery__track {
    display: flex;
    gap: 12px;
    width: max-content;
    padding-inline: 0;
}

.customer-gallery__item {
    flex: 0 0 min(50.4vw, 189px);
    width: min(50.4vw, 189px);
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.customer-gallery__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;

    background: #edf0f1;
    border-radius: 10px;
}

.customer-gallery__photo img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;

    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.customer-gallery__meta {
    padding: 11px 3px 0;
}

.customer-gallery__author-row {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 22px;
}

.customer-gallery__text {
    color: var(--text, #172027);
    font-size: 14px;
    font-weight: 700;
}

.customer-gallery__city {
    color: var(--text-muted);
    font-size: 14px;
}

.customer-gallery__arrow {
    position: absolute;
    top: 42%;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: var(--brand);
    color: #FFF;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(23, 32, 39, 0.1);
    transform: translateY(-50%);
}

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

.customer-gallery__arrow--prev {
    left: 0;
}

.customer-gallery__arrow--next {
    right: 0;
}

.customer-gallery__arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.customer-gallery__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin-top: 23px;
}

.customer-gallery__dot {
    width: 6px;
    height: 6px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(32, 59, 74, 0.2);

    cursor: pointer;

    transition:
        width 0.25s ease,
        background 0.25s ease;
}

.customer-gallery__dot.is-active {
    width: 20px;
    border-radius: 10px;
    background: var(--brand, #203b4a);
}

.customer-gallery__dot:focus-visible {
    outline: 2px solid var(--brand, #203b4a);
    outline-offset: 3px;
}

@media (min-width: 768px) {
    .customer-gallery__title {
        font-size: 36px;
    }

    .customer-gallery__track {
        gap: 16px;
    }

    .customer-gallery__item {
        flex-basis: 240px;
        width: 240px;
    }
}

@media (min-width: 1024px) {
    .customer-gallery__heading {
        margin-bottom: 38px;
    }

    .customer-gallery__track {
        padding-left: 0;
        padding-right: 0;
    }

    .customer-gallery__item {
        flex-basis: calc((100vw - 120px) / 4);
        width: calc((100vw - 120px) / 4);
        max-width: 270px;

        scroll-snap-align: start;
    }

    .customer-gallery__arrow {
        display: flex;
    }
}

@media (min-width: 1200px) {
    .customer-gallery__item {
        flex-basis: 258px;
        width: 258px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .customer-gallery__viewport {
        scroll-behavior: auto;
    }

    .customer-gallery__arrow,
    .customer-gallery__dot {
        transition: none;
    }
}