/*
 * MEW Despacho - Produtos próximos de você
 * Seção independente para a Home do marketplace.
 */

.mew-nearby-section {
    position: relative;
    margin: 4px 0 30px;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 4%, rgba(37, 99, 235, .10), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, .98), 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-nearby-section::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -105px;
    bottom: -125px;
    border-radius: 50%;
    background: rgba(14, 165, 233, .08);
    pointer-events: none;
}

.mew-nearby-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.mew-nearby-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mew-nearby-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -.025em;
}

.mew-nearby-heading p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.mew-nearby-see-all {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    color: #1d4ed8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    border-radius: 12px;
    transition: background-color .2s ease, transform .2s ease;
}

.mew-nearby-see-all:hover {
    background: #eff6ff;
    transform: translateX(2px);
}

.mew-nearby-see-all:focus-visible,
.mew-nearby-image-link:focus-visible,
.mew-nearby-card h3 a:focus-visible,
.mew-nearby-action:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}

.mew-nearby-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: #bfdbfe transparent;
}

.mew-nearby-scroller::-webkit-scrollbar {
    height: 6px;
}

.mew-nearby-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.mew-nearby-scroller::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 999px;
}

.mew-nearby-card {
    flex: 0 0 270px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .065);
    scroll-snap-align: start;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.mew-nearby-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 34px rgba(37, 99, 235, .13);
}

.mew-nearby-image-link {
    position: relative;
    display: block;
    height: 176px;
    overflow: hidden;
    background: #f8fafc;
}

.mew-nearby-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .28s ease;
}

.mew-nearby-card:hover .mew-nearby-image {
    transform: scale(1.035);
}

.mew-nearby-distance {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 9px;
    color: #166534;
    background: rgba(240, 253, 244, .96);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    box-shadow: 0 7px 16px rgba(15, 23, 42, .10);
    font-size: 10px;
    font-weight: 900;
}

.mew-nearby-card-body {
    padding: 15px;
}

.mew-nearby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.mew-nearby-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.mew-nearby-card h3 {
    margin: 0;
    min-height: 42px;
    font-size: 15px;
    line-height: 1.4;
}

.mew-nearby-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mew-nearby-card h3 a:hover {
    color: #1d4ed8;
}

.mew-nearby-price {
    display: block;
    margin-top: 11px;
    color: #0f172a;
    font-size: 21px;
    letter-spacing: -.02em;
}

.mew-nearby-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.mew-nearby-seller {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mew-nearby-action {
    margin-top: 13px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-radius: 11px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 9px 18px rgba(37, 99, 235, .20);
    transition: transform .2s ease, box-shadow .2s ease;
}

.mew-nearby-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(37, 99, 235, .27);
}

.mew-nearby-note {
    position: relative;
    z-index: 1;
    margin: 7px 3px 0;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.4;
}

@media (max-width: 820px) {
    .mew-nearby-section {
        padding: 20px 16px 17px;
        border-radius: 22px;
    }

    .mew-nearby-heading {
        align-items: flex-start;
    }

    .mew-nearby-heading p {
        font-size: 13px;
    }

    .mew-nearby-card {
        flex-basis: 250px;
    }
}

@media (max-width: 560px) {
    .mew-nearby-section {
        margin-inline: -2px;
        padding-inline: 14px;
    }

    .mew-nearby-heading {
        margin-bottom: 14px;
    }

    .mew-nearby-heading h2 {
        font-size: 22px;
    }

    .mew-nearby-heading p {
        max-width: 235px;
    }

    .mew-nearby-see-all {
        padding: 7px 4px 7px 8px;
        font-size: 11px;
    }

    .mew-nearby-scroller {
        gap: 11px;
        margin-inline: -2px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .mew-nearby-scroller::-webkit-scrollbar {
        display: none;
    }

    .mew-nearby-card {
        flex-basis: 232px;
        border-radius: 18px;
    }

    .mew-nearby-image-link {
        height: 154px;
    }

    .mew-nearby-card-body {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mew-nearby-card,
    .mew-nearby-image,
    .mew-nearby-see-all,
    .mew-nearby-action {
        transition: none;
    }
}