/* Hide the plain links until the script builds the slider. */
.ls-product-carousel > a {
    display: none;
}

.ls-product-carousel {
    --ls-per-page: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 1100px;
    margin: 28px auto 36px;
    position: relative;
}

.carousel-container {
    width: calc(100% - 32px);
}

/* Hero slot: the top area is a fixed height with overflow hidden. */
.carousel-container .ls-product-carousel {
    width: calc(100% - 28px);
    margin: 10px 12px 0 16px;
    gap: 8px;
}

.most-sold {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 8px;
}

.ls-product-carousel__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    touch-action: pan-y;
}

.ls-product-carousel__track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.55s ease;
    will-change: transform;
}

.ls-product-carousel__item {
    flex: 0 0 calc(100% / var(--ls-per-page));
    width: calc(100% / var(--ls-per-page));
    max-width: calc(100% / var(--ls-per-page));
    min-width: 0;
    display: flex;
    box-sizing: border-box;
    /* Room for the drop shadow so the viewport does not clip it. */
    padding: 4px 8px 10px;
}

.ls-product-carousel__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    height: 100%;
    background: #d6d6d6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
    filter: drop-shadow(6px 6px 3px rgba(36, 43, 34, 0.55));
    text-decoration: none;
    color: #ffffff;
}

.carousel-container .ls-product-carousel__image {
    flex: 0 0 72px;
    height: 72px;
    aspect-ratio: auto;
    overflow: hidden;
}

.carousel-container .ls-product-carousel__image img {
    padding: 0;
    object-fit: cover;
    object-position: center;
    transform: scale(1.28);
}

.carousel-container .ls-product-carousel__name {
    min-height: 2.5em;
    padding: 5px 4px 6px;
    font-size: 12px;
    line-height: 1.15;
}

.carousel-container .ls-product-carousel__arrow {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
}

.carousel-container .ls-product-carousel__item {
    padding: 4px 8px 8px;
}

.ls-product-carousel__image {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 0;
    aspect-ratio: auto;
    background: #d6d6d6;
}

.ls-product-carousel__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    padding: 8px;
    box-sizing: border-box;
    margin: 0;
}

.ls-product-carousel__name {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    margin: 0;
    padding: 8px 10px;
    background: #9bb246;
    color: #ffffff;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.ls-product-carousel__card:hover .ls-product-carousel__name,
.ls-product-carousel__card:focus-visible .ls-product-carousel__name {
    background: #242b22;
    color: #ffffff;
}

.ls-product-carousel__card:focus-visible {
    outline: 2px solid #242b22;
    outline-offset: 3px;
}

.ls-product-carousel__arrow {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #9bb246;
    color: #ffffff;
    box-shadow: 4px 4px 8px rgba(36, 43, 34, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.ls-product-carousel__arrow svg {
    display: block;
}

.ls-product-carousel__arrow:hover:not(:disabled),
.ls-product-carousel__arrow:focus-visible:not(:disabled) {
    background: #242b22;
    color: #ffffff;
}

.ls-product-carousel__arrow:focus-visible {
    outline: 2px solid #242b22;
    outline-offset: 3px;
}

.ls-product-carousel__arrow:disabled {
    background: #c5c5c5 !important;
    color: #ffffff !important;
    box-shadow: none;
    cursor: default;
    opacity: 1 !important;
}

.front-page-start-here-button-container:has(.carousel-container) {
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    width: 100% !important;
    float: left;
}

@media (max-width: 480px) {
    .carousel-container {
        width: 100%;
    }

    .ls-product-carousel__arrow {
        display: none;
    }


    .most-sold {
        font-size: 26px;
    }

    .carousel-container .ls-product-carousel__item {
        padding: 4px 6px 6px;
    }
}


@media (max-width: 768px) {
    .ls-product-carousel {
        gap: 0;
        margin: 16px auto 24px;
    }

    .ls-product-carousel__arrow {
        position: absolute;
        top: 42%;
        z-index: 2;
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .ls-product-carousel__prev {
        left: 2px;
    }

    .ls-product-carousel__next {
        right: 2px;
    }

    .ls-product-carousel__item {
        padding: 4px 6px 8px;
    }

    .ls-product-carousel__card {
        border-radius: 12px;
        box-shadow: none;
        filter: drop-shadow(3px 3px 2px rgba(36, 43, 34, 0.45));
    }

    .carousel-container .ls-product-carousel {
        width: 100%;
        max-width: none;
        margin: 12px 0 4px;
        gap: 0;
    }

    .carousel-container .ls-product-carousel__arrow {
        top: 18px;
    }

    .carousel-container .ls-product-carousel__image {
        flex-basis: 72px;
        height: 72px;
    }

    .carousel-container .ls-product-carousel__name {
        min-height: 2.6em;
        padding: 4px 3px 5px;
        font-size: 11px;
    }

    .ls-product-carousel__image img {
        padding: 4px;
    }

    .ls-product-carousel__name {
        min-height: 2.4em;
        padding: 6px 4px;
        font-size: 12px;
        line-height: 1.15;
    }
}

@media (max-width: 1199px) {
    .ls-product-carousel {
        --ls-per-page: 2;
    }
}

@media (max-width: 899px) {
    .ls-product-carousel {
        --ls-per-page: 1;
    }
}

@media (max-width: 768px) {
    .ls-product-carousel {
        --ls-per-page: 3;
    }
}

@media (max-width: 610px) {
    .ls-product-carousel {
        --ls-per-page: 2;
    }
}

@media (max-width: 899px) {
    .ls-product-carousel {
        --ls-per-page: 1;
    }
}

@media (max-width: 480px) {
    .ls-product-carousel {
        --ls-per-page: 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ls-product-carousel__track {
        transition: none;
    }
}

