/* Progressive enhancement: without JS, the existing product grid stays usable. */
#latest-products.jangro-latest-carousel { min-width: 0; }
#latest-products[data-latest-carousel-ready] .products-grid {
    overflow: hidden;
    padding: 4px 4px 14px;
}
#latest-products[data-latest-carousel-ready] .products-grid .product-items {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--carousel-columns, 4) - 1) * 18px) / var(--carousel-columns, 4));
    grid-template-columns: none;
    gap: 18px;
    overflow: visible;
    padding: 0;
    margin: 0;
    transition: transform .4s ease;
    touch-action: pan-y;
}
#latest-products[data-latest-carousel-ready] .products-grid .product-item:nth-child(n) {
    width: auto;
    margin: 0;
    min-width: 0;
}
#latest-products .jangro-latest-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
}
#latest-products .jangro-latest-carousel__controls[hidden] { display: none; }
#latest-products .jangro-latest-carousel__controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #0b5143;
    border-radius: 50%;
    background: #fff;
    color: #0b5143;
    font-size: 24px;
    line-height: 1;
    box-shadow: none;
}
#latest-products .jangro-latest-carousel__controls button:hover { background: #edf3e9; }
#latest-products .jangro-latest-carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; }
#latest-products .jangro-latest-carousel__dots button { width: 24px; height: 44px; border: 0; background: transparent; }
#latest-products .jangro-latest-carousel__dots button::before {
    content: ''; width: 10px; height: 10px; border: 1px solid #0b5143; border-radius: 50%;
}
#latest-products .jangro-latest-carousel__dots button[aria-current="true"]::before { background: #0b5143; }
#latest-products .jangro-latest-carousel__controls button:focus-visible,
#latest-products .product-items:focus-visible { outline: 3px solid #82c43b; outline-offset: -3px; }
#latest-products .jangro-latest-carousel__status {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
    #latest-products[data-latest-carousel-ready] .products-grid .product-items { transition: none; }
}
