/**
 * Recently Viewed Section (Legacy)
 * این فایل فقط برای backward compatibility نگه داشته شده
 * استایل‌های اصلی در user-products.css هستند
 */

/* ========================================
   Legacy Recently Viewed Section
   ======================================== */

/* Section */
.recently-viewed-section {
    background: var(--bg-body);
}

.recently-viewed-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.clear-recently-viewed {
    color: var(--text-muted);
}

.clear-recently-viewed:hover {
    color: var(--danger);
}

/* Slider Container */
.recently-viewed-slider {
    position: relative;
}

.recently-viewed-swiper {
    overflow: hidden;
}

/* Product Card */
.recently-viewed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recently-viewed-card:hover {
    border-color: var(--accent);
}

/* Card Image */
.recently-viewed-card .product-card-image {
    position: relative;
    background: var(--bg-body);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recently-viewed-card .product-card-img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.recently-viewed-card:hover .product-card-img {
    transform: scale(1.05);
}

/* Remove Button */
.recently-viewed-card .remove-viewed-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.recently-viewed-card:hover .remove-viewed-btn {
    opacity: 1;
    visibility: visible;
}

.recently-viewed-card .remove-viewed-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* Card Body */
.recently-viewed-card .product-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Title */
.recently-viewed-card .product-card-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

.recently-viewed-card .product-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recently-viewed-card .product-card-title a:hover {
    color: var(--accent);
}

/* Price */
.recently-viewed-card .product-card-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
}

.recently-viewed-card .product-card-price del {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
    margin-left: 8px;
}

.recently-viewed-card .product-card-price ins {
    text-decoration: none;
    color: var(--danger);
}

/* Navigation Buttons */
.recently-viewed-slider .swiper-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.recently-viewed-slider .swiper-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.recently-viewed-slider .swiper-nav-prev {
    right: -20px;
}

.recently-viewed-slider .swiper-nav-next {
    left: -20px;
}

.recently-viewed-slider .swiper-nav-btn i {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 1023px) {
    .recently-viewed-slider .swiper-nav-prev {
        right: -10px;
    }

    .recently-viewed-slider .swiper-nav-next {
        left: -10px;
    }
}

@media (max-width: 767px) {
    .recently-viewed-slider .swiper-nav-btn {
        display: none;
    }
}