/**
 * Recently Viewed — Prayag Pandits
 * Toast notification + horizontal scroll section.
 * Design system: Inter + Source Serif 4, maroon #960000, saffron #E8731A, cream #fffdfb
 */

/* ── Welcome Back Toast ──────────────────────────────────── */

.ppn-rv-toast {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9980;
    max-width: 360px;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ppn-rv-toast-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ppn-rv-toast-inner {
    background: linear-gradient(180deg, #fffdfb 0%, #fdf5ee 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 3px solid #E8731A;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

.ppn-rv-toast-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    color: rgba(68, 68, 68, 0.6);
    margin-bottom: 6px;
    line-height: 1.4;
}

.ppn-rv-toast-wave {
    display: inline-block;
    animation: ppn-rv-wave 1.5s ease-in-out 1;
    transform-origin: 70% 70%;
}

@keyframes ppn-rv-wave {
    0%, 100% { transform: rotate(0); }
    20%      { transform: rotate(14deg); }
    40%      { transform: rotate(-8deg); }
    60%      { transform: rotate(10deg); }
    80%      { transform: rotate(-4deg); }
}

.ppn-rv-toast-link {
    display: block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #960000;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.ppn-rv-toast-link:hover {
    color: #B80000;
}

.ppn-rv-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: rgba(68, 68, 68, 0.4);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.ppn-rv-toast-close:hover {
    background: rgba(68, 68, 68, 0.08);
    color: rgba(68, 68, 68, 0.8);
}


/* ── Recently Viewed Section ─────────────────────────────── */

.ppn-rv-section {
    padding: 48px 0;
}

.ppn-rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 4px;
}

.ppn-rv-header h3 {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgb(68, 68, 68);
    margin: 0;
    letter-spacing: -0.01em;
}

.ppn-rv-viewall {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #960000;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.ppn-rv-viewall:hover {
    color: #B80000;
}


/* ── Horizontal Scroll Row ───────────────────────────────── */

.ppn-rv-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px;
}

.ppn-rv-scroll::-webkit-scrollbar {
    display: none;
}


/* ── Card ────────────────────────────────────────────────── */

.ppn-rv-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ppn-rv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ppn-rv-card-img {
    width: 100%;
    height: 120px;
    background-color: #f0e8dc;
}

.ppn-rv-card-body {
    padding: 12px 14px;
}

.ppn-rv-card-type {
    display: inline-block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(68, 68, 68, 0.4);
    margin-bottom: 4px;
}

.ppn-rv-card-body h4 {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgb(68, 68, 68);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ppn-rv-card:hover .ppn-rv-card-body h4 {
    color: #960000;
}


/* ── Mobile (max-width: 768px) ───────────────────────────── */

@media (max-width: 768px) {
    .ppn-rv-toast {
        left: 12px;
        right: 12px;
        bottom: 72px;
        max-width: none;
    }

    .ppn-rv-section {
        padding: 32px 0;
    }

    .ppn-rv-header h3 {
        font-size: 1.05rem;
    }

    .ppn-rv-card {
        flex: 0 0 160px;
    }

    .ppn-rv-card-img {
        height: 96px;
    }

    .ppn-rv-card-body {
        padding: 10px 12px;
    }

    .ppn-rv-card-body h4 {
        font-size: 0.78rem;
    }
}
