/* ============================================
   J2R Product Carousel — Elementor Widget
   ============================================ */

.j2r-pc {
    --j2r-pc-visible: 4;
    --j2r-pc-gap: 24px;
    --j2r-pc-hover-speed: 0.4s;
    overflow: hidden;
    position: relative;
}

/* --- Track --- */
.j2r-pc__track {
    display: flex;
    gap: var(--j2r-pc-gap);
    will-change: transform;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.j2r-pc__track.is-dragging {
    cursor: grabbing;
}

.j2r-pc__track.is-dragging a {
    pointer-events: none;
}

/* --- Items --- */
.j2r-pc__item {
    flex: 0 0 calc(
        (100% - var(--j2r-pc-gap) * (var(--j2r-pc-visible) - 1)) / var(--j2r-pc-visible)
    );
    min-width: 0;
    text-decoration: none;
    display: block;
}

/* --- Image container --- */
.j2r-pc__images {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.j2r-pc__images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.j2r-pc__front {
    z-index: 1;
    transition: opacity var(--j2r-pc-hover-speed) ease;
}

.j2r-pc__back {
    z-index: 2;
    opacity: 0;
    transition: opacity var(--j2r-pc-hover-speed) ease;
}

.j2r-pc__item:hover .j2r-pc__front {
    opacity: 0;
}

.j2r-pc__item:hover .j2r-pc__back {
    opacity: 1;
}

/* --- Typography defaults --- */
.j2r-pc__title {
    font-family: 'Host Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    margin-top: 12px;
}

.j2r-pc__desc {
    font-family: 'Host Grotesk', sans-serif;
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
    margin-top: 4px;
}

/* --- Responsive image sizing (defaults, overridable via Elementor) --- */
@media (max-width: 1366px) {
    .j2r-pc__images {
        height: 280px;
    }
}

@media (max-width: 1024px) {
    .j2r-pc__images {
        height: 220px;
    }
}

@media (max-width: 767px) {
    .j2r-pc__images {
        height: auto;
    }
}
