.product-carousel { position: relative; }

.pc-viewport {
    overflow: hidden;
    padding: 18px 12px 34px;
    margin: -18px -12px -34px;
}

.pc-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform .45s ease;
    will-change: transform;
}

.pc-track .product-item-grid {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 10px;
    box-sizing: border-box;
}

.pc-track template { display: none !important; }

.pc-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--b2c-line, #e6e8ec);
    border-radius: 50%;
    background: var(--b2c-surface, #fff);
    color: var(--b2c-ink, #171a1f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    cursor: pointer;
    z-index: 5;
    transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pc-btn.prev { left: -14px; }
.pc-btn.next { right: -14px; }

.pc-btn:hover {
    color: var(--b2c-primary, #1d4ed8);
    border-color: color-mix(in srgb, var(--b2c-primary, #1d4ed8) 40%, var(--b2c-line, #e6e8ec));
    box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
}

.pc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
}

.pc-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--b2c-line, #e6e8ec);
    cursor: pointer;
    transition: all .25s ease;
}

.pc-dot.active {
    width: 20px;
    border-radius: 10px;
    background: var(--b2c-primary, #1d4ed8);
}

@media (max-width: 767px) {

    .pc-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        width: auto;
        scroll-padding-left: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;

        padding-top: 18px;
        padding-bottom: 34px;
        margin-top: -18px;
        margin-bottom: -34px;
    }
    .pc-viewport::-webkit-scrollbar { display: none; }

    .pc-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        transition: none;
    }
    .pc-track::after {
        content: "";
        flex: 0 0 1px;
        margin-left: -1px;
    }
    .pc-track .product-item-grid {
        flex: 0 0 calc((100% - 24px) / 2 - 6px);
        max-width: calc((100% - 24px) / 2 - 6px);
        padding: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .pc-btn { display: none; }
}
