/**
 * Recently Viewed Products - CSS Styles
 */

.recently-viewed-products {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recently-viewed-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.recently-viewed-products-container {
    position: relative;
}

.recently-viewed-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Sidebar version */
.recently-viewed-sidebar .recently-viewed-slider {
    grid-template-columns: 1fr;
    gap: 15px;
}

.recently-viewed-item {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recently-viewed-item:hover {
    transform: translateY(-5px);
}

.recently-viewed-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.recently-viewed-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.recently-viewed-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f8f8f8;
}

.recently-viewed-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recently-viewed-link:hover .recently-viewed-image {
    transform: scale(1.05);
}

.recently-viewed-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 48px;
}

.recently-viewed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.recently-viewed-discount {
    background: #ff4444;
    color: #fff;
}

.recently-viewed-info {
    padding: 15px;
}

.recently-viewed-product-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.recently-viewed-price {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.recently-viewed-price .price {
    color: #27ae60;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recently-viewed-products {
        margin: 20px 0;
        padding: 15px;
    }

    .recently-viewed-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .recently-viewed-slider {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .recently-viewed-info {
        padding: 12px;
    }

    .recently-viewed-product-name {
        font-size: 13px;
        min-height: 36px;
    }

    .recently-viewed-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .recently-viewed-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .recently-viewed-products {
        padding: 10px;
    }
}

/* Loading State */
.recently-viewed-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Empty State */
.recently-viewed-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

.recently-viewed-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #ddd;
}

