/* Recently Viewed Section Styles - Flipkart Style */
/* Uses same container structure as Featured Products and All Products sections */

.recently-viewed-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.recently-viewed-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 0;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    max-width: 100%;
}

.recently-viewed-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.recently-viewed-products {
    display: flex;
    gap: 20px;
    min-width: max-content;
}

.recently-viewed-card {
    flex: 0 0 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: #212121;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.recently-viewed-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #2874f0;
}

.recently-viewed-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.recently-viewed-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.recently-viewed-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6161;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.recently-viewed-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recently-viewed-title {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.recently-viewed-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.recently-viewed-current-price {
    font-size: 18px;
    font-weight: 600;
    color: #212121;
}

.recently-viewed-original-price {
    font-size: 14px;
    color: #878787;
    text-decoration: line-through;
}

.recently-viewed-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.recently-viewed-rating .rating-stars {
    color: #ffa500;
    font-size: 12px;
}

.recently-viewed-rating .rating-count {
    font-size: 12px;
    color: #878787;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s;
}

.scroll-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-btn-right {
    right: 20px;
}

.scroll-btn i {
    color: #2874f0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recently-viewed-card {
        flex: 0 0 160px;
        min-height: 280px;
        padding: 12px;
    }

    .recently-viewed-image-wrapper {
        height: 140px;
    }

    .recently-viewed-title {
        font-size: 13px;
        min-height: 36px;
    }

    .recently-viewed-current-price {
        font-size: 16px;
    }
}