.device-carousel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.device-carousel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.device-carousel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #aac0d3;
    border-radius: 50%;
    background: #fff;
    color: #375d81;
    font-size: 20px;
    line-height: 1;
}


.device-carousel-button:hover {
    background: #375d81;
    border-color: #375d81;
    color: #fff;
}

.device-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.device-carousel-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.device-carousel-track::-webkit-scrollbar {
    display: none;
}

.device-carousel-item {
    flex: 0 0 calc((100% - 54px) / 4);
    min-width: 0;
    scroll-snap-align: start;
}

.device-carousel-item .phone-last {
    height: 100%;
    margin-bottom: 0;
	/* Reserve carousel image space on desktop and tablet */
.device-carousel-item .phone-last .img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.device-carousel-item .phone-last .img > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.device-carousel-item .phone-last .img img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: contain;
}
}

@media (max-width: 991px) {
    .device-carousel-item {
        flex-basis: calc((100% - 36px) / 3);
    }
}

@media (max-width: 600px) {
	.last-phones .device-carousel-item .phone-last .img > a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.last-phones .device-carousel-item .phone-last .img > a img {
    pointer-events: none;
}
    .device-carousel-track {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        grid-auto-columns: calc((100% - 12px) / 2);
        gap: 12px;
    }

    .last-phones .device-carousel-item {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        float: none;
		order: var(--mobile-order, 0);
    }

    .last-phones .device-carousel-item .phone-last {
        width: 100%;
        min-height: 230px;
        margin: 0;
        padding: 6px;
        border: 1px solid #eeeeee;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
    }

    .last-phones .device-carousel-item .phone-last:hover,
    .last-phones .device-carousel-item .phone-last:focus-within {
        border-color: #6d98c3;
        cursor: pointer;
    }

    .last-phones .device-carousel-item .phone-last .img {
        display: flex;
        width: 100%;
        height: 145px;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: #f7f7f8;
    }

    .last-phones .device-carousel-item .phone-last .img img {
        width: auto;
        max-width: 92%;
        height: auto;
        max-height: 132px;
        object-fit: contain;
    }

    .last-phones .device-carousel-item .phone-last .caption {
        min-height: 68px;
        padding: 9px 4px 4px;
        text-align: center;
        font-size: 14px;
        line-height: 1.35;
    }

    .last-phones .device-carousel-item .phone-last .caption b {
        display: block;
        margin-top: 2px;
        font-size: 15px;
        line-height: 1.25;
    }

    .last-phones .device-carousel-item .phone-price {
        margin-top: 5px;
        font-size: 16px;
    }

    .device-carousel-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .device-carousel-track {
        scroll-behavior: auto;
    }
}
.device-carousel-view-all {
    color: inherit;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 5px;
    margin-right: 5px;
    text-decoration: none;
    text-transform: none;
}

.device-carousel-view-all:hover,
.device-carousel-view-all:focus {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .device-carousel-heading { align-items: center; }
    .device-carousel-title { font-size: 13px; }
    .device-carousel-view-all { font-size: 11px; }
}
@media (max-width: 767px) {
    .device-carousel-controls {
        gap: 5px;
    }

    .device-carousel-view-all {
        font-size: 12px;
        margin-right: 2px;
    }

    .device-carousel-button {
        width: 30px;
        height: 30px;
        font-size: 17px;
    }
}