.bestsellers {
    margin-top: calc(var(--bnd-base) * 3);
    margin-bottom: calc(var(--bnd-base) * 4);

    .bestsellers__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .bestsellers__controls {
        display: none;
    }

    .bestsellers__viewport {
        margin-top: var(--bnd-base);
    }

    .bestsellers__track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 20px;
        overflow: hidden;
    }

    .product-card--best {
        min-height: 0;
    }

    .product-card--wide {
        grid-column: 1 / -1;
        min-height: 560px;

        .product-card__image {
            position: absolute;
            inset: 0;
            height: 100%;
            aspect-ratio: auto;
        }

        .product-card__body {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 1;
            padding: calc(var(--bnd-base) * 4) var(--bnd-base) var(--bnd-base);
        }
    }

    .product-card__image {
        aspect-ratio: 1 / 1;
    }

    .product-card__image img {
        min-height: 100%;
    }

}

@media (min-width: 600px) {
    .bestsellers {
        margin-top: calc(var(--bnd-base) * 4);
        margin-bottom: calc(var(--bnd-base) * 6);

        .bestsellers__viewport {
            margin-top: calc(var(--bnd-base) * 2);
        }

        .bestsellers__track {
            gap: 40px;
        }

        .product-card--best {
            min-height: 640px;
        }

        .product-card--wide {
            min-height: 680px;

            .product-card__body {
                width: min(350px, 100%);
                right: auto;
            }
        }

        .product-card--best:not(.product-card--wide) {
            .product-card__image {
                flex: 1 1 auto;
                aspect-ratio: auto;
            }
        }

    }
}

@media (min-width: 1170px) {
    .bestsellers {
        .bestsellers__controls {
            display: flex;
            gap: 10px;
        }

        .bestsellers__viewport {
            overflow: hidden;
        }

        .bestsellers__track {
            display: flex;
            gap: 40px;
            overflow: hidden;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            scrollbar-width: none;
        }

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

        .product-card--best {
            flex: 0 0 calc((100% - 40px) / 3);
            min-height: 720px;
            scroll-snap-align: start;
        }

        .product-card--wide {
            flex-basis: calc((100% - 40px) / 3 * 2);
        }
    }
}

@media (min-width: 1600px) {
    .bestsellers {
        .bestsellers__controls {
            display: none;
        }

        .bestsellers__track {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 40px;
        }

        .product-card--best,
        .product-card--wide {
            flex: initial;
            min-height: 720px;
        }

        .product-card--wide {
            grid-column: auto;
        }
    }
}

@media (min-width: 1601px) {
    .bestsellers {
        > .section__inner {
            max-width: 1520px;
            padding-right: 0;
            padding-left: 0;
        }
    }
}
