/*
 * MEW Despacho - Vistos recentemente
 * Histórico leve por navegador para facilitar a retomada da compra.
 */

.mew-recent-section {
    position: relative;
    margin: 0 0 30px;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 0%, rgba(124, 58, 237, .08), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, .97), rgba(248, 250, 252, .94));
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 26px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.mew-recent-section::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    top: -180px;
    right: -120px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .07);
    pointer-events: none;
}

.mew-recent-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.mew-recent-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #7c3aed;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mew-recent-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(23px, 3vw, 31px);
    letter-spacing: -.025em;
}

.mew-recent-heading p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.mew-recent-see-all {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    color: #6d28d9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    border-radius: 12px;
    transition: background-color .2s ease, transform .2s ease;
}

.mew-recent-see-all:hover {
    background: #f5f3ff;
    transform: translateX(2px);
}

.mew-recent-see-all:focus-visible,
.mew-recent-card a:focus-visible {
    outline: 3px solid rgba(124, 58, 237, .26);
    outline-offset: 3px;
}

.mew-recent-scroller {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 3px 12px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd6fe transparent;
}

.mew-recent-scroller::-webkit-scrollbar {
    height: 6px;
}

.mew-recent-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.mew-recent-scroller::-webkit-scrollbar-thumb {
    background: #ddd6fe;
    border-radius: 999px;
}

.mew-recent-card {
    flex: 0 0 225px;
    overflow: hidden;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e7e5ff;
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .065);
    scroll-snap-align: start;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.mew-recent-card:hover {
    transform: translateY(-4px);
    border-color: #c4b5fd;
    box-shadow: 0 18px 34px rgba(91, 33, 182, .13);
}

.mew-recent-image-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f8fafc;
}

.mew-recent-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .28s ease;
}

.mew-recent-card:hover .mew-recent-image {
    transform: scale(1.035);
}

.mew-recent-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 6px 9px;
    color: #5b21b6;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(221, 214, 254, .95);
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.mew-recent-card-body {
    padding: 14px;
}

.mew-recent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.mew-recent-tags span {
    padding: 5px 7px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.mew-recent-card h3 {
    min-height: 38px;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.mew-recent-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mew-recent-price {
    display: block;
    margin-top: 10px;
    color: #111827;
    font-size: 19px;
    letter-spacing: -.02em;
}

.mew-recent-location,
.mew-recent-seller {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mew-recent-seller {
    margin-top: 4px;
    color: #475569;
    font-weight: 800;
}

.mew-recent-action {
    margin-top: 12px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 12px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    border-radius: 11px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 9px 18px rgba(91, 33, 182, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.mew-recent-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(91, 33, 182, .24);
}

.mew-recent-note {
    position: relative;
    z-index: 1;
    margin: 7px 2px 0;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.4;
}

@media (max-width: 820px) {
    .mew-recent-section {
        padding: 20px 16px 17px;
        border-radius: 22px;
    }

    .mew-recent-heading {
        align-items: flex-start;
    }

    .mew-recent-heading p {
        font-size: 13px;
    }

    .mew-recent-card {
        flex-basis: 205px;
    }
}

@media (max-width: 560px) {
    .mew-recent-section {
        margin-inline: -2px;
        padding-inline: 14px;
    }

    .mew-recent-heading {
        margin-bottom: 14px;
    }

    .mew-recent-heading h2 {
        font-size: 22px;
    }

    .mew-recent-heading p {
        max-width: 235px;
    }

    .mew-recent-see-all {
        padding: 7px 4px 7px 8px;
        font-size: 12px;
    }

    .mew-recent-scroller {
        gap: 10px;
        margin-inline: -2px;
        padding-bottom: 8px;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }

    .mew-recent-scroller::-webkit-scrollbar {
        display: none;
    }

    .mew-recent-card {
        flex-basis: 180px;
        border-radius: 17px;
    }

    .mew-recent-card-body {
        padding: 12px;
    }

    .mew-recent-price {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mew-recent-see-all,
    .mew-recent-card,
    .mew-recent-image,
    .mew-recent-action {
        transition: none;
    }
}