/* Container and Section Header */
.jtg-rp-wrapper,
.jtg-rp-cart-strip-wrapper {
    margin: 40px auto;
    width: 100%;
    max-width: 100%;
    clear: both;
    position: relative;
    box-sizing: border-box;
}

.jtg-rp-title {
    font-size: 1.45rem;
    font-weight: 500;
    margin: 0 0 24px 0;
    color: #e5e5e5;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Outer wrapper for positioning overlay arrows */
.jtg-rp-carousel-outer {
    position: relative;
    width: 100%;
}

/* Track with horizontal scroll-snap (hides default browser scrollbars) */
.jtg-rp-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 10px 0 20px 0;
    margin: 0;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;  /* IE and Edge */
}

.jtg-rp-carousel-track::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
    width: 0 !important;
    height: 0 !important;
}

/* Overlay Navigation Arrows: Exact position matching WebToffee */
.jtg-rp-nav {
    position: absolute;
    /* Centers arrow vertically over the cover art area */
    top: 130px; 
    z-index: 50;
    background: rgba(18, 18, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-family: Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.jtg-rp-nav:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.jtg-rp-prev {
    left: 12px;
}

.jtg-rp-next {
    right: 12px;
}

/* Product Card Styling: Matches Shop Grid */
.jtg-rp-card {
    flex: 0 0 calc((100% - (var(--jtg-rp-cols-desktop, 5) - 1) * 16px) / var(--jtg-rp-cols-desktop, 5));
    scroll-snap-align: start;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    border: 1px solid #222222;
    border-radius: 8px;
    overflow: hidden;
    padding: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.jtg-rp-card:hover {
    border-color: #383838;
}

/* 1:1 Square Cover Art */
.jtg-rp-card-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
    background: #000;
    border-radius: 6px;
}

.jtg-rp-card-thumbnail-link {
    display: block;
    width: 100%;
    height: 100%;
}

.jtg-rp-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Percentage Discount Badge */
.jtg-rp-badge-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #9be622;
    color: #0b1a03;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
    line-height: 1.2;
}

/* Card Content / Details */
.jtg-rp-card-content {
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.jtg-rp-card-title-link {
    text-decoration: none;
    color: #e5e5e5;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
}

.jtg-rp-card-title-link:hover {
    color: #fff;
}

/* Steam Badge */
.jtg-rp-platform-badge {
    display: inline-block;
    border: 1px solid #333333;
    color: #888;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Price */
.jtg-rp-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.jtg-rp-card-price del {
    color: #777;
    font-size: 0.8rem;
    font-weight: normal;
    margin-right: 6px;
}

.jtg-rp-card-price ins {
    text-decoration: none;
    color: #fff;
}

/* Add to Cart Button (matches site style) */
.jtg-rp-ajax-btn {
    width: 100% !important;
    background: #181818 !important;
    color: #ffffff !important;
    border: 1px solid #2e2e2e !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    margin-top: auto !important;
}

.jtg-rp-ajax-btn:hover {
    background: #252525 !important;
    border-color: #444 !important;
}

.jtg-rp-ajax-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

.jtg-rp-ajax-btn.added {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
}

/* Cart Strip Grid */
.jtg-rp-cart-strip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 1rem;
}

.jtg-rp-cart-strip-grid .jtg-rp-card {
    flex: initial;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .jtg-rp-card {
        flex: 0 0 calc((100% - (var(--jtg-rp-cols-tablet, 3) - 1) * 16px) / var(--jtg-rp-cols-tablet, 3));
    }
}

@media (max-width: 576px) {
    .jtg-rp-card {
        flex: 0 0 calc((100% - (var(--jtg-rp-cols-mobile, 1) - 1) * 16px) / var(--jtg-rp-cols-mobile, 1));
    }
    .jtg-rp-nav {
        display: none !important;
    }
}