/* ========================================================
   RECENTLY VIEWED SECTION – PREMIUM DARK LUXURY DESIGN
   ========================================================

   Theme Overview:
   • Deep dark gradient background with subtle purple tones
   • Gold gradient text & glowing star accent for heading
   • Thick colorful (pink/blue) borders + extreme circular images
   • Smooth loading animation & premium hover effects
   • Glassmorphism & shadow depth for modern feel
   • Consistent left-aligned horizontal scroll (no desktop centering)
   ======================================================== */

/* ───────────────────────────────────────────────────────
   SECTION 1: MAIN CONTAINER & LAYOUT
   ─────────────────────────────────────────────────────── */
#recently-viewed {
    position: relative !important;
    width: 100% !important;
    overflow-x: hidden !important;
    
    /* Background & visual depth */
    background: linear-gradient(135deg, #0a0a0f 0%, #14141f 50%, #1a1125 100%) !important;
    border-top: 1px solid rgba(255, 215, 0, 0.08) !important;
    
    /* Spacing & structure */
    padding: 16px 18px 24px !important;
    box-sizing: border-box !important;
    
    /* Typography base & stacking context */
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    z-index: 9998 !important;
    
    /* Shadows & glass effect */
    box-shadow: 
        0 -6px 20px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03) !important;
    backdrop-filter: blur(4px) !important;
}

/* ───────────────────────────────────────────────────────
   SECTION 2: HEADER AREA
   ─────────────────────────────────────────────────────── */

/* Header layout (title + controls row) */
.rv-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 14px !important;
}

/* Main section title styling – gold gradient + glow */
.rv-header h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    letter-spacing: 0.8px !important;
    
    color: #ffd700 !important;                      /* fallback color */
    background: linear-gradient(90deg, #f5d070, #e8b923, #ffd700) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    
    text-shadow: 
        0 1px 4px rgba(0,0,0,0.6),
        0 0 10px rgba(255, 215, 0, 0.15) !important;
}

/* Star icon accent in title */
.rv-header h3 .star {
    display: inline-block !important;
    font-size: 16px !important;
    margin-right: 8px !important;
    background: linear-gradient(135deg, #ffd700, #ffea9f, #d4a017) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 
        0 1px 3px rgba(0,0,0,0.5),
        0 0 12px rgba(255, 215, 0, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Subtle shine animation on hover */
.rv-header h3:hover .star {
    animation: shine 2s infinite !important;
}

@keyframes shine {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; filter: brightness(1.3); }
}

/* ───────────────────────────────────────────────────────
   SECTION 3: CONTROLS (buttons)
   ─────────────────────────────────────────────────────── */
.rv-controls {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

.rv-controls button {
    background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04)) !important;
    border: 1px solid rgba(255, 215, 0, 0.12) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #f0e8d0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

.rv-controls button:hover {
    background: linear-gradient(145deg, #ff4655, #d32f2f) !important;
    border-color: #ff6b7a !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(255,70,85,0.35) !important;
}

/* ───────────────────────────────────────────────────────
   SECTION 4: SCROLL CONTAINER & SCROLLBAR
   ─────────────────────────────────────────────────────── */
.rv-items-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 8px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 215, 0, 0.2) transparent !important;
}

.rv-items-wrapper::-webkit-scrollbar {
    height: 6px !important;
}

.rv-items-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.25) !important;
    border-radius: 10px !important;
}

.rv-items-wrapper::-webkit-scrollbar-track {
    background: transparent !important;
}

/* ───────────────────────────────────────────────────────
   SECTION 5: ITEMS ROW & INDIVIDUAL CARDS
   ─────────────────────────────────────────────────────── */
.rv-items {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
}

/* Card wrapper (link element) */
.rv-items a {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    min-width: 74px !important;
    max-width: 150px !important;
    color: #ccc !important;
    text-decoration: none !important;
    transition: all 0.35s ease !important;
}

.rv-items a:hover {
    color: #fff !important;
    transform: translateY(-3px) !important;
}

/* ───────────────────────────────────────────────────────
   SECTION 6: THUMBNAIL IMAGES (main visual style)
   ─────────────────────────────────────────────────────── */
.rv-items img {
    width: 124px !important;
    height: 124px !important;
    object-fit: cover !important;
    margin-bottom: 8px !important;
    
    /* Colorful thick border + extreme roundness */
    border-radius: 500px !important;
    border-top:    7px solid #0e92f5 !important;
    border-right:  7px solid #0e92f5 !important;
    border-bottom: 7px solid #f404c0 !important;
    border-left:   7px solid #f404c0 !important;
    
    box-shadow: 
        inset 0 0 12px rgba(0,0,0,0.45),
        0 6px 16px rgba(0,0,0,0.5) !important;
    
    /* Loading animation */
    opacity: 0 !important;
    transform: scale(0.97) !important;
    transition: all 0.45s ease !important;
}

.rv-items img.loaded {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.rv-items a:hover img {
    transform: scale(1.08) !important;
    box-shadow: 
        inset 0 0 18px rgba(244, 4, 192, 0.35) !important,
        0 12px 28px rgba(0,0,0,0.6) !important,
        0 0 24px rgba(14, 146, 245, 0.35) !important;
}

/* Desktop image size override */
@media (min-width: 768px) {
    .rv-items img,
    .rv-items img.loaded {
        width: 160px !important;
        height: 160px !important;
    }
    
    .rv-items a {
        max-width: 160px !important;
    }
}

/* ───────────────────────────────────────────────────────
   SECTION 7: CAPTION / TITLE BELOW IMAGE
   ─────────────────────────────────────────────────────── */
.rv-items span {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    opacity: 0.9 !important;
    color: #e0d9c0 !important;
}

/* ───────────────────────────────────────────────────────
   SECTION 8: NAVIGATION ARROWS (if enabled)
   ─────────────────────────────────────────────────────── */
.rv-nav {
    display: none !important;
    position: absolute !important;
    top: 45% !important;
    transform: translateY(-50%) !important;
    background: rgba(20,20,30,0.6) !important;
    backdrop-filter: blur(10px) !important;
    color: #ffd700 !important;
    border: 1px solid rgba(255,215,0,0.15) !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

.rv-nav:hover {
    background: rgba(255,70,85,0.85) !important;
    color: #fff !important;
    transform: translateY(-50%) scale(1.12) !important;
}

#rv-prev { left: 12px !important; }
#rv-next { right: 12px !important; }

/* ───────────────────────────────────────────────────────
   SECTION 9: EMPTY STATE
   ─────────────────────────────────────────────────────── */
.rv-empty {
    color: #b0a080 !important;
    font-size: 15px !important;
    font-style: italic !important;
    font-weight: 400 !important;
    padding: 28px 20px !important;
    text-align: center !important;
    width: 100% !important;
    letter-spacing: 0.4px !important;
}