/* ═══════════════════════════════════════════════════════
   RECENTLY VIEWED SECTION
   ═══════════════════════════════════════════════════════ */

.m77-recently-viewed-section {
    padding: 40px 0;
}

/* Section Header */
.m77-recently-viewed-section .m77-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.m77-recently-viewed-section .m77-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
    line-height: 1.3;
}

.m77-recently-viewed-section .m77-section-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Clear All Link */
.m77-clear-recently-viewed {
    font-size: 13px;
    color: #e53935;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.m77-clear-recently-viewed:hover {
    color: #c62828;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   CAROUSEL STYLES (inherits from find-by-choice)
   ═══════════════════════════════════════════════════════ */

.m77-recently-viewed-section .m77-carousel-container {
    position: relative !important;
    width: 100% !important;
}

.m77-recently-viewed-section .m77-carousel-viewport {
    overflow: hidden !important;
    margin: 0 50px;
}

.m77-recently-viewed-section .m77-carousel-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.m77-recently-viewed-section .m77-carousel-slide {
    flex: 0 0 24% !important;
    min-width: 24% !important;
    max-width: 24% !important;
}

/* ═══════════════════════════════════════════════════════
   CAR CARD
   ═══════════════════════════════════════════════════════ */

.m77-rv-car-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: all 0.25s ease;
    height: 100%;
    position: relative;
}

.m77-rv-car-card:hover {
    border-color: #ddd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Remove button */
.m77-rv-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.m77-rv-car-card:hover .m77-rv-remove {
    opacity: 1;
}

.m77-rv-remove:hover {
    background: #e53935;
}

/* Car Image */
.m77-rv-car-image {
    height: 140px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.m77-rv-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m77-rv-car-placeholder {
    font-size: 32px;
    font-weight: 700;
    color: #ccc;
}

/* Car Info */
.m77-rv-car-info {
    padding: 14px 16px;
}

.m77-rv-car-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 6px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m77-rv-car-price {
    font-size: 13px;
    color: #e53935;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 1199px) and (min-width: 768px) {
    .m77-recently-viewed-section .m77-carousel-slide {
        flex: 0 0 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
    }
}

@media (max-width: 767px) and (min-width: 576px) {
    .m77-recently-viewed-section .m77-carousel-slide {
        flex: 0 0 48% !important;
        min-width: 48% !important;
        max-width: 48% !important;
    }

    .m77-recently-viewed-section .m77-section-header {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 575px) {
    .m77-recently-viewed-section .m77-carousel-slide {
        flex: 0 0 85% !important;
        min-width: 85% !important;
        max-width: 85% !important;
    }

    .m77-recently-viewed-section .m77-carousel-viewport {
        margin: 0;
        padding: 0 16px;
        overflow-x: auto !important;
    }

    .m77-recently-viewed-section .m77-carousel-arrow {
        display: none !important;
    }

    .m77-rv-remove {
        opacity: 1;
    }
}
