/* ============================================================
   Related Posts Lookbook — Slider Styles
   ============================================================ */

.rpl-slider-wrap {
    margin: 2em 0;
    padding: 1.25rem 0 1.25rem 1.25rem;
    background: #f8f8f6;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
}

.rpl-slider-heading {
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #222;
    margin: 0 0 1rem 0;
    padding-right: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── Track ── */
.rpl-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    padding-right: 1.25rem;

    /* Hide scrollbar — visible on hover */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.rpl-track::-webkit-scrollbar {
    height: 3px;
}

.rpl-track::-webkit-scrollbar-track {
    background: transparent;
}

.rpl-track::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* ── Card ── */
.rpl-card {
    flex: 0 0 150px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: block;
    text-decoration: none;
    scroll-snap-align: start;
    background: #e4e4e0;
    cursor: pointer;

    /* Subtle lift on hover */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rpl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.rpl-card:focus-visible {
    outline: 2px solid #1D9E75;
    outline-offset: 3px;
}

/* ── Featured image ── */
.rpl-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.rpl-card:hover .rpl-card-img {
    transform: scale(1.04);
}

/* Placeholder when no featured image */
.rpl-card-img--placeholder {
    background: linear-gradient(135deg, #d8d8d4 0%, #c8c8c4 100%);
}

/* ── Scrim + title ── */
.rpl-card-scrim {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.38) 50%,
        transparent 100%
    );
}

.rpl-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin: 0;

    /* Clamp to 4 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Peek card (visual cue there are more) ── */
.rpl-peek-card {
    flex: 0 0 20px;
    border-radius: 6px 0 0 6px;
    background: #e4e4e0;
    opacity: 0.4;
    height: auto;
    align-self: stretch;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .rpl-slider-wrap {
        padding: 1rem 0 1rem 1rem;
        border-radius: 10px;
    }

    .rpl-card {
        flex: 0 0 130px;
    }
}

@media (min-width: 960px) {
    .rpl-card {
        flex: 0 0 168px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .rpl-card,
    .rpl-card-img {
        transition: none;
    }
}
