﻿:root {
    --sp-primary: #1E88E5;
    --sp-primary-dark: #1565C0;
    --sp-primary-light: #E3F2FD;
    --sp-success: #43A047;
    --sp-danger: #E53935;
    --sp-ladder: #5B21B6;
    --sp-warning: #FB8C00;
    --sp-text: #1a1a1a;
    --sp-text-secondary: #666;
    --sp-text-light: #999;
    --sp-bg: #FFFFFF;
    --sp-bg-card: #F8F9FB;
    --sp-border: #E8EAED;
    --sp-border-light: #F0F2F5;
    --sp-radius: 14px;
    --sp-radius-sm: 10px;
    --sp-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sp-font: 'vazir', sans-serif;
    --sp-ad-blue: #2563EB;
    --sp-ad-blue-light: #DBEAFE;
    --sp-ad-blue-glow: rgba(37, 99, 235, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: var(--sp-font);
    background: var(--sp-bg);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.sp-ads-page, .sp-detail-page {
    font-family: var(--sp-font);
    direction: rtl;
    background: var(--sp-bg);
    min-height: 100vh;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.sp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    width: 100%;
    overflow: visible;
}

/* ========== BUTTONS & BADGES ========== */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--sp-font);
    cursor: pointer;
    transition: var(--sp-transition);
    min-height: 44px;
    text-decoration: none;
    white-space: nowrap;
}

.sp-btn-primary {
    background: var(--sp-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30,136,229,0.15);
}

    .sp-btn-primary:hover {
        background: var(--sp-primary-dark);
        transform: translateY(-1px);
        color: #fff;
        text-decoration: none;
    }

.sp-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    line-height: 1.6;
}

.sp-badge-urgent {
    background: var(--sp-danger);
}

.sp-badge-bumped {
    background: var(--sp-ladder);
}

.sp-badge-warranty {
    background: var(--sp-success);
}

.sp-badge-delivery {
    background: #7B1FA2;
}

.sp-badge-ad {
    background: linear-gradient(135deg, var(--sp-ad-blue), #60A5FA) !important;
    box-shadow: 0 2px 8px var(--sp-ad-blue-glow);
    animation: sp-ad-pulse 2s ease-in-out infinite;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 4px 8px !important;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50% !important;
}

@keyframes sp-ad-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.12);
        opacity: 0.9;
    }
}

/* ========== TOAST ========== */
.sp-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transition: all 0.4s ease;
    font-family: var(--sp-font);
    max-width: 90%;
    pointer-events: none;
}

    .sp-toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

/* ========== MODALS ========== */
.sp-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(16px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .sp-modal.active {
        display: flex;
        animation: sp-fade-in 0.25s ease;
    }

@keyframes sp-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sp-modal-lightbox {
    position: relative;
    width: 100%;
    max-width: 90vw;
    max-height: 85vh;
}

    .sp-modal-lightbox .swiper-slide {
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .sp-modal-lightbox .swiper-slide img {
            max-width: 100%;
            max-height: 85vh;
            object-fit: contain;
            border-radius: var(--sp-radius-sm);
            cursor: default;
        }

    .sp-modal-lightbox .swiper-pagination-bullet {
        background: rgba(255,255,255,0.6);
        opacity: 1;
        width: 8px;
        height: 8px;
    }

    .sp-modal-lightbox .swiper-pagination-bullet-active {
        background: #fff;
        width: 20px;
        border-radius: 4px;
    }

    .sp-modal-lightbox .swiper-button-next, .sp-modal-lightbox .swiper-button-prev {
        color: #fff;
        background: rgba(255,255,255,0.15);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.2);
    }

        .sp-modal-lightbox .swiper-button-next:after, .sp-modal-lightbox .swiper-button-prev:after {
            font-size: 16px;
        }

.sp-modal-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sp-transition);
    z-index: 100000;
}

    .sp-modal-close:hover {
        background: var(--sp-danger);
        border-color: var(--sp-danger);
        transform: rotate(90deg);
    }

.sp-share-modal-container {
    background: #fff;
    border-radius: var(--sp-radius);
    padding: 24px 20px 20px;
    max-width: 380px;
    width: 92%;
    text-align: center;
    direction: rtl;
    position: relative;
}

.sp-share-modal-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--sp-text);
}

.sp-share-modal-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-share-link {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-text);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: var(--sp-radius-sm);
    transition: var(--sp-transition);
    min-height: 52px;
}

    .sp-share-link:hover {
        background: var(--sp-primary-light);
        color: var(--sp-primary);
        text-decoration: none;
    }

    .sp-share-link img {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
    }

/* ========== SEARCH SECTION ========== */
.sp-search-section {
    margin-bottom: 20px;
}

.sp-search-card {
    background: #FFFFFF;
    border-radius: var(--sp-radius);
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #E8EAED;
}

/* ========== ACTIVE FILTERS ========== */
.sp-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 14px;
    font-size: 13px;
    width: 100%;
}

.sp-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.sp-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sp-primary-light);
    color: var(--sp-primary-dark);
    padding: 6px 8px 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(30,136,229,0.2);
}

    .sp-tag.sp-tag-brand {
        background: #eff6ff;
        color: #2563eb;
        border-color: #bfdbfe;
    }

    .sp-tag.sp-tag-size {
        background: #f5f3ff;
        color: #7c3aed;
        border-color: #ddd6fe;
    }

.sp-tag-remove {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    border-radius: 50px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--sp-transition);
    font-family: var(--sp-font);
}

    .sp-tag-remove:hover {
        background: #FEF2F2;
        border-color: #FECACA;
        color: #B91C1C;
    }

.sp-clear-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #B91C1C;
    background: #FEF2F2;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #FECACA;
    transition: var(--sp-transition);
    white-space: nowrap;
    min-height: 36px;
}

    .sp-clear-all:hover {
        background: #FEE2E2;
        color: #991B1B;
        text-decoration: none;
        border-color: #FCA5A5;
    }

/* ========================================
   ADS GRID - 3 columns desktop, 2 tablet, 1 mobile
   Compact horizontal cards, height from content
   ======================================== */

.sp-ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
    align-items: stretch;
}

.sp-ad-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #E6E8EC;
    width: 100%;
    height: auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

    .sp-ad-card:hover {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        border-color: #CBD5E1;
    }

    /* ===== کارت‌های تبلیغاتی ===== */
    .sp-ad-card[data-is-ad="true"] {
        border-color: var(--sp-ad-blue) !important;
        box-shadow: 0 4px 20px var(--sp-ad-blue-glow) !important;
        border-width: 2px !important;
        position: relative;
        overflow: hidden;
        height: auto;
        min-height: 0;
        align-self: stretch;
    }

        .sp-ad-card[data-is-ad="true"]::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(to bottom, var(--sp-ad-blue), #60A5FA);
            border-radius: 0 4px 4px 0;
            z-index: 2;
        }

        .sp-ad-card[data-is-ad="true"]:hover {
            box-shadow: 0 8px 24px var(--sp-ad-blue-glow) !important;
        }

        /* تصویر تمام‌کارت برای تبلیغات */
        .sp-ad-card[data-is-ad="true"] .sp-ad-link {
            position: relative;
            height: auto;
            min-height: 0;
            display: block;
            padding: 0;
            overflow: hidden;
        }

        .sp-ad-card[data-is-ad="true"] .sp-ad-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100% !important;
            height: 100% !important;
            min-width: unset !important;
            max-width: unset !important;
            margin: 0 !important;
            border-radius: 0;
            aspect-ratio: auto;
            flex-shrink: 0;
            background: #E8ECF1;
        }

            .sp-ad-card[data-is-ad="true"] .sp-ad-image img {
                position: absolute;
                top: 0;
                left: 0;
                object-fit: contain;
                width: 100%;
                height: 100%;
                display: block;
            }

        /* پنهان کردن بدنه در کارت تبلیغاتی */
        .sp-ad-card[data-is-ad="true"] .sp-ad-body {
            display: none !important;
        }

        .sp-ad-card[data-is-ad="true"] .sp-ad-badges {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 5;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .sp-ad-card[data-is-ad="true"] .sp-image-count {
            position: absolute;
            bottom: 10px;
            left: 10px;
            z-index: 5;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            padding: 2px 10px;
            border-radius: 20px;
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .sp-ad-card[data-is-ad="true"] .sp-badge-ad {
            background: linear-gradient(135deg, var(--sp-ad-blue), #60A5FA) !important;
            box-shadow: 0 0 20px var(--sp-ad-blue-glow);
            animation: sp-ad-pulse 2s ease-in-out infinite;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            padding: 4px 10px !important;
            min-width: 32px;
            min-height: 32px;
            border-radius: 50% !important;
            font-size: 12px;
        }

            .sp-ad-card[data-is-ad="true"] .sp-badge-ad svg {
                width: 14px;
                height: 14px;
            }

.sp-ad-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 120px;
    flex: 1;
}

.sp-ad-image {
    position: relative;
    background: #E8ECF1;
    overflow: hidden;
    flex-shrink: 0;
}

.sp-ad-card:not([data-is-ad="true"]) .sp-ad-image {
    position: relative;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    margin: 6px;
    border-radius: 14px;
    background: #E8ECF1;
    overflow: hidden;
    flex-shrink: 0;
    align-self: stretch;
}

    .sp-ad-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.sp-img-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #E8ECF1 25%, #F4F6F8 50%, #E8ECF1 75%);
    background-size: 200% 100%;
    animation: sp-img-shimmer 1.2s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.sp-img-skeleton + img {
    opacity: 0;
    z-index: 1;
    transition: transform 0.5s ease, opacity 0.25s ease;
}

.sp-img-skeleton + img.is-loaded {
    opacity: 1;
}

@keyframes sp-img-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.sp-scroll-sentinel {
    width: 100%;
    height: 1px;
    pointer-events: none;
}

.sp-ad-card:hover .sp-ad-image img {
    transform: scale(1.05);
}

.sp-ad-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-text-light);
    background: #E8ECF1;
}

.sp-ad-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.sp-image-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

/* ===== بدنه کارت - عنوان و اندازه درشت ===== */
.sp-ad-body {
    padding: 12px 12px 12px 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: center;
    overflow: hidden;
}

.sp-ad-meta-row,
.sp-ad-specs-mini,
.sp-ad-price-row {
    flex-shrink: 0;
}

/* عنوان کارت - درشت و خوانا */
.sp-ad-title {
    font-size: 22px;
    font-weight: 800;
    color: #111111;
    margin-top: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    letter-spacing: -0.2px;
    width: 100%;
}

.sp-ad-card:hover .sp-ad-title {
    color: var(--sp-primary);
}

.sp-ad-meta-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.sp-ad-meta-tag {
    font-size: 12px;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #F8FAFC;
    padding: 2px 10px;
    border-radius: 50px;
    border: 1px solid #E8EAED;
}

    .sp-ad-meta-tag svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }

.sp-ad-specs-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 0;
    margin-top: 0;
}

.sp-ad-spec-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.4;
}

    .sp-ad-spec-tag svg {
        width: 11px;
        height: 11px;
        flex-shrink: 0;
        color: #94a3b8;
    }

    .sp-ad-spec-tag.sp-ad-spec-brand {
        color: #2563eb;
        border-color: #bfdbfe;
        background: #eff6ff;
    }

        .sp-ad-spec-tag.sp-ad-spec-brand svg {
            color: #3b82f6;
        }

    .sp-ad-spec-tag.sp-ad-spec-size {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        width: fit-content;
        max-width: 100%;
        margin: 0;
        padding: 5px 12px;
        color: #5B21B6;
        background: #F5F3FF;
        border: 1px solid #DDD6FE;
        border-radius: 999px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
        font-size: 16px;
        font-weight: 800;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .sp-ad-spec-tag.sp-ad-spec-size svg {
            width: 15px;
            height: 15px;
            color: #7C3AED;
        }

.sp-ad-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sp-ad-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-wrap: wrap;
}

.sp-price-amount {
    color: var(--sp-primary);
    font-size: 16px;
    font-weight: 800;
}

.sp-price-currency {
    font-size: 11px;
    font-weight: 500;
    color: var(--sp-text-secondary);
}

.sp-price-negotiable {
    color: var(--sp-primary-dark);
    font-size: 14px;
    font-weight: 700;
}

.sp-price-none {
    color: var(--sp-text-secondary);
    font-size: 13px;
}

.sp-ad-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #F59E0B;
    background: #FFFBEB;
    padding: 2px 8px;
    border-radius: 50px;
    border: 1px solid #FDE68A;
}

/* ===== No Results ===== */
.sp-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--sp-bg-card);
    border-radius: var(--sp-radius);
    border: 2px dashed var(--sp-border);
    width: 100%;
}

    .sp-no-results svg {
        color: var(--sp-text-light);
        margin-bottom: 16px;
    }

    .sp-no-results h3 {
        font-size: 20px;
        color: var(--sp-text);
        margin-bottom: 8px;
    }

    .sp-no-results p {
        color: var(--sp-text-secondary);
        margin-bottom: 20px;
        font-size: 14px;
    }

/* ===== Loading & Pagination ===== */
.sp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
    color: var(--sp-text-secondary);
    width: 100%;
    grid-column: 1 / -1;
}

.sp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--sp-border);
    border-top: 3px solid var(--sp-primary);
    border-radius: 50%;
    animation: sp-spin 0.7s linear infinite;
}

@keyframes sp-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.sp-no-more {
    text-align: center;
    padding: 20px;
    color: var(--sp-text-light);
    font-size: 14px;
    width: 100%;
    grid-column: 1 / -1;
}

.sp-pagination {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    width: 100%;
    overflow-x: auto;
}

.sp-pagination-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.sp-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50px;
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    color: var(--sp-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--sp-transition);
}

    .sp-pagination-link:hover {
        background: var(--sp-primary-light);
        border-color: var(--sp-primary);
        color: var(--sp-primary);
        text-decoration: none;
        transform: translateY(-2px);
    }

.sp-pagination-current {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: #fff;
    cursor: default;
}

    .sp-pagination-current:hover {
        background: var(--sp-primary);
        color: #fff;
        transform: none;
    }

.sp-pagination-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--sp-text-light);
}

/* ========================================
   استایل‌های جستجوی ساده
   ======================================== */

.sp-search-minimal {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px 24px 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #E8EAED;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
    position: relative;
    z-index: 30;
}

    .sp-search-minimal form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

.sp-search-main-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.sp-search-actions-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.sp-location-actions-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: nowrap;
}

    .sp-location-actions-row .sp-btn-city {
        flex: 1 1 0;
        min-width: 0;
    }

    .sp-search-actions-row .sp-btn-city,
    .sp-search-actions-row .sp-btn-filter-toggle {
        flex: 1 1 auto;
    }

    .sp-search-actions-row .sp-btn-search {
        flex: 0 0 auto;
    }

.sp-search-field {
    display: flex;
    flex-direction: column;
}

.sp-search-input-wrap {
    flex: 1;
    position: relative;
}

    .sp-search-input-wrap input {
        width: 100%;
        padding: 14px 20px;
        padding-right: 50px;
        border: 2px solid #E8EAED;
        border-radius: 14px;
        font-size: 1rem;
        font-family: var(--sp-font);
        background: #F8F9FB;
        color: #1a1a1a;
        transition: all 0.3s ease;
        outline: none;
        min-height: 54px;
        direction: rtl;
    }

        .sp-search-input-wrap input:focus {
            border-color: #1E88E5;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.06);
        }

        .sp-search-input-wrap input::placeholder {
            color: #b0b7c3;
            font-size: 0.95rem;
        }

    .sp-search-input-wrap .sp-search-icon {
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        color: #94A3B8;
        pointer-events: none;
        z-index: 2;
    }

.sp-search-suggest {
    position: static;
    margin-top: 8px;
    background: #ffffff;
    border: 1.5px solid #8B95A5;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    animation: sp-suggest-in 0.18s ease;
}

    .sp-search-suggest.is-open {
        display: block;
    }

    .sp-search-suggest[hidden] {
        display: none !important;
    }

@keyframes sp-suggest-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sp-search-suggest-head {
    padding: 10px 16px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748B;
}

.sp-search-suggest-list {
    list-style: none;
    margin: 0;
    padding: 4px 6px 8px;
}

.sp-search-suggest-item {
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 10px;
}

    .sp-search-suggest-item:hover {
        background: #F8FAFC;
    }

.sp-search-suggest-pick {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 10px 10px;
    cursor: pointer;
    text-align: right;
    font-family: var(--sp-font);
    font-size: 0.98rem;
    font-weight: 600;
    color: #0F172A;
    min-height: 44px;
    min-width: 0;
}

    .sp-search-suggest-pick svg {
        flex-shrink: 0;
        color: #94A3B8;
    }

    .sp-search-suggest-pick span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sp-search-suggest-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 4px;
    border: none;
    background: none;
    color: #94A3B8;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

    .sp-search-suggest-remove:hover {
        background: #F1F5F9;
        color: #E53935;
    }

.sp-btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--sp-font);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 54px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(30, 136, 229, 0.25);
}

    .sp-btn-search:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(30, 136, 229, 0.35);
    }

.sp-btn-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 18px;
    background: #F8F9FB;
    border: 2px solid #E8EAED;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--sp-font);
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 54px;
    white-space: nowrap;
}

    .sp-btn-filter-toggle:hover {
        border-color: #1E88E5;
        color: #1E88E5;
        background: #ffffff;
    }

    .sp-btn-filter-toggle.active {
        border-color: #1E88E5;
        background: #E3F2FD;
        color: #1565C0;
    }

    .sp-btn-filter-toggle .sp-badge-dot {
        width: 8px;
        height: 8px;
        background: #EF4444;
        border-radius: 50%;
        display: none;
        flex-shrink: 0;
    }

    .sp-btn-filter-toggle.active .sp-badge-dot {
        display: block;
    }

/* ========================================
   مودال شهر/محله یکپارچه
   ======================================== */

/* دکمه شهر */
.sp-btn-city {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    background: #F8F9FB;
    border: 2px solid #E8EAED;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 54px;
    white-space: nowrap;
    position: relative;
}

    .sp-btn-city:hover {
        border-color: #1E88E5;
        color: #1E88E5;
        background: #ffffff;
    }

    .sp-btn-city.active {
        border-color: #1E88E5;
        background: #E3F2FD;
        color: #1565C0;
    }

    .sp-btn-city .sp-city-icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .sp-btn-city .sp-city-label,
    .sp-btn-city .sp-hood-label {
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 700;
        font-size: 0.95rem;
        min-width: 0;
    }

    .sp-btn-city.is-disabled {
        background: #F1F5F9;
        color: #94A3B8;
        border-color: #E8EAED;
        box-shadow: none;
    }

        .sp-btn-city.is-disabled:hover {
            border-color: #CBD5E1;
            color: #64748B;
            background: #F8FAFC;
        }

    .sp-btn-city .sp-city-clear {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: rgba(30, 136, 229, 0.15);
        color: #1E88E5;
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

        .sp-btn-city .sp-city-clear:hover {
            background: rgba(30, 136, 229, 0.25);
            transform: scale(1.1);
        }

    .sp-btn-city .sp-city-arrow {
        flex-shrink: 0;
        color: #94A3B8;
        transition: transform 0.3s ease;
    }

    .sp-btn-city:hover .sp-city-arrow {
        color: #1E88E5;
    }

/* ===== مودال شهر/محله ===== */
.sp-location-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(12px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

    .sp-location-modal.active {
        display: flex;
        animation: sp-fade-in 0.25s ease;
    }

.sp-location-modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.20);
    animation: sp-modal-slide-up 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sp-filters-modal-content {
    max-width: 480px;
}

.sp-filters-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sp-float-field {
    position: relative;
}

    .sp-float-field input {
        width: 100%;
        padding: 20px 16px 8px;
        border: 2px solid #64748B;
        border-radius: 12px;
        font-size: 1.05rem;
        font-weight: 600;
        font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
        outline: none;
        background: #ffffff;
        color: #0F172A;
        min-height: 56px;
        direction: rtl;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .sp-float-field input:focus {
            border-color: #1E88E5;
            box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.10);
        }

    .sp-float-field label {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.05rem;
        font-weight: 600;
        color: #475569;
        pointer-events: none;
        background: #ffffff;
        padding: 0 6px;
        line-height: 1;
        transition: all 0.18s ease;
        font-family: var(--sp-font,  'Shabnam', sans-serif);
    }

    .sp-float-field input:focus + label,
    .sp-float-field input:not(:placeholder-shown) + label {
        top: 0;
        font-size: 0.82rem;
        color: #1E88E5;
        transform: translateY(-50%);
    }

.sp-float-has-icon input {
    padding-right: 46px;
}

.sp-float-has-icon label {
    right: 46px;
}

.sp-float-has-icon input:focus + label,
.sp-float-has-icon input:not(:placeholder-shown) + label {
    right: 12px;
}

.sp-float-has-icon .sp-search-icon-sm {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
    pointer-events: none;
    z-index: 1;
}

.sp-filter-size-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sp-location-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: #F1F5F9;
    color: #334155;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
}

    .sp-location-back:hover {
        background: #E2E8F0;
        color: #0F172A;
    }

    .sp-location-back[hidden] {
        display: none !important;
    }

.sp-hood-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 2px solid #1E88E5;
    border-radius: 14px;
    cursor: pointer;
    text-align: right;
    font-family: var(--sp-font,  'Shabnam', sans-serif);
    color: #0F172A;
    min-height: 64px;
    transition: all 0.2s ease;
}

    .sp-hood-cta:hover {
        background: #E3F2FD;
        box-shadow: 0 6px 18px rgba(30, 136, 229, 0.12);
    }

    .sp-hood-cta[hidden] {
        display: none !important;
    }

.sp-hood-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #E3F2FD;
    color: #1565C0;
    flex-shrink: 0;
}

.sp-hood-cta-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

    .sp-hood-cta-text strong {
        font-size: 1.05rem;
        font-weight: 800;
        color: #0F172A;
    }

    .sp-hood-cta-text small {
        font-size: 0.82rem;
        color: #64748B;
        font-weight: 500;
    }

.sp-hood-cta-meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1565C0;
    flex-shrink: 0;
}

.sp-hood-cta-arrow {
    color: #1E88E5;
    flex-shrink: 0;
}

.sp-hood-city-chip {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #E3F2FD;
    color: #1565C0;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

@keyframes sp-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sp-location-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid #F1F5F9;
    flex-shrink: 0;
    gap: 8px;
}

    .sp-location-modal-header h3 {
        font-size: 1.35rem;
        font-weight: 800;
        color: #0F172A;
        font-family: var(--sp-font, 'Shabnam', sans-serif);
        flex: 1;
        margin: 0;
        line-height: 1.5;
    }
.sp-location-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .sp-location-modal-close:hover {
        background: #F1F5F9;
        color: #1a1a1a;
    }

.sp-location-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

    .sp-location-modal-body .sp-search-box {
        position: relative;
        margin-bottom: 16px;
    }

        .sp-location-modal-body .sp-search-box input {
            width: 100%;
            padding: 12px 16px;
            padding-right: 44px;
            border: 2px solid #64748B;
            border-radius: 12px;
            font-size: 1.05rem;
            font-family: var(--sp-font, 'Shabnam', sans-serif);
            outline: none;
            transition: all 0.3s ease;
            background: #ffffff;
            direction: rtl;
        }

            .sp-location-modal-body .sp-search-box input:focus {
                border-color: #1E88E5;
                background: #ffffff;
                box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.06);
            }

        .sp-location-modal-body .sp-search-box .sp-search-icon-sm {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #94A3B8;
        }

    .sp-location-modal-body .sp-search-box-small input {
        padding: 8px 12px;
        padding-right: 36px;
        font-size: 0.85rem;
        min-height: 36px;
    }

    .sp-location-modal-body .sp-search-box-small .sp-search-icon-sm {
        right: 10px;
    }

.sp-city-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    max-height: min(420px, 52vh);
    overflow-y: auto;
    padding: 2px 0;
}

.sp-city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #1a1a1a;
    border: 1px solid transparent;
    font-family: var(--sp-font,  'Shabnam', sans-serif);
}

    .sp-city-item:hover {
        background: #F8FAFC;
        border-color: #E8EAED;
    }

    .sp-city-item.selected {
        background: #E3F2FD;
        border-color: #1E88E5;
        color: #1565C0;
    }

    .sp-city-item input[type="radio"] {
        width: 17px;
        height: 17px;
        accent-color: #1E88E5;
        flex-shrink: 0;
        cursor: pointer;
    }

    .sp-city-item .sp-city-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .sp-city-item .sp-city-name {
        font-weight: 800;
        font-size: 16px;
        line-height: 1.8;
        color: #0F172A;
        letter-spacing: 0;
    }

    .sp-city-item .sp-city-province {
        font-size: 0.7rem;
        color: #94A3B8;
    }

    .sp-city-item .sp-city-check {
        color: #1E88E5;
        font-weight: 700;
        font-size: 0.7rem;
    }

.sp-city-group-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94A3B8;
    padding: 8px 12px 4px;
    grid-column: 1 / -1;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== بخش محله‌ها ===== */
.sp-neighborhood-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #F1F5F9;
}

.sp-neighborhood-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sp-neighborhood-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0F172A;
}

.sp-neighborhood-count {
    font-size: 0.75rem;
    color: #94A3B8;
    background: #F1F5F9;
    padding: 2px 10px;
    border-radius: 12px;
}

.sp-neighborhood-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    max-height: min(380px, 48vh);
    overflow-y: auto;
    padding: 2px 0;
}

.sp-neighborhood-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
    color: #1a1a1a;
    border: 1px solid transparent;
    font-family: var(--sp-font, 'Shabnam', sans-serif);
}

    .sp-neighborhood-item:hover {
        background: #F8FAFC;
        border-color: #E8EAED;
    }

    .sp-neighborhood-item.selected {
        background: #E3F2FD;
        border-color: #1E88E5;
        color: #1565C0;
    }

    .sp-neighborhood-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #1E88E5;
        flex-shrink: 0;
        cursor: pointer;
    }

    .sp-neighborhood-item .sp-hood-info {
        display: flex;
        flex-direction: column;
        gap: 1px;
        flex: 1;
    }

    .sp-neighborhood-item .sp-hood-name {
        font-weight: 600;
        font-size: 0.92rem;
    }

    .sp-neighborhood-item .sp-hood-desc {
        font-size: 0.75rem;
        color: #94A3B8;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.sp-neighborhood-empty {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    color: #94A3B8;
    font-size: 0.85rem;
}

/* ===== فوتر مودال ===== */
.sp-location-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px 18px;
    border-top: 2px solid #F1F5F9;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

    .sp-location-modal-footer .sp-selected-summary {
        font-size: 0.85rem;
        color: #64748B;
        font-family: var(--sp-font,  'Shabnam', sans-serif);
    }

        .sp-location-modal-footer .sp-selected-summary strong {
            color: #1E88E5;
        }

    .sp-location-modal-footer .sp-location-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .sp-location-modal-footer button {
        padding: 9px 24px;
        border: none;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 700;
        font-family: var(--sp-font, 'Shabnam', sans-serif);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .sp-location-modal-footer .sp-btn-confirm {
        background: linear-gradient(135deg, #1E88E5, #1565C0);
        color: #ffffff;
        box-shadow: 0 4px 16px rgba(30, 136, 229, 0.30);
    }

        .sp-location-modal-footer .sp-btn-confirm:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(30, 136, 229, 0.40);
        }

    .sp-location-modal-footer .sp-btn-reset {
        background: #F1F5F9;
        color: #64748B;
    }

        .sp-location-modal-footer .sp-btn-reset:hover {
            background: #E2E8F0;
        }

/* ========================================
   HOVER EFFECTS - دسکتاپ فقط
   ======================================== */
@media (min-width: 769px) {
    .sp-ad-card[data-is-ad="true"]:hover {
        box-shadow: 0 8px 24px var(--sp-ad-blue-glow) !important;
    }

        .sp-ad-card[data-is-ad="true"]:hover .sp-ad-image img {
            transform: scale(1.06);
        }

        .sp-ad-card[data-is-ad="true"]:hover .sp-ad-image::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
            pointer-events: none;
            z-index: 1;
            animation: sp-ad-shine 0.6s ease;
        }

    @keyframes sp-ad-shine {
        0% {
            opacity: 0;
            transform: scale(0.8);
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            transform: scale(1.2);
        }
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* تبلت - 2 ستون */
@media (max-width: 1024px) {
    .sp-container {
        padding: 16px 16px 30px;
    }

    .sp-ads-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .sp-ad-card,
    .sp-ad-link {
        height: auto;
        min-height: 112px;
        max-height: none;
    }

    .sp-ad-card[data-is-ad="true"],
    .sp-ad-card[data-is-ad="true"] .sp-ad-link {
        height: auto;
        min-height: 0;
        max-height: none;
        align-self: stretch;
    }

    .sp-ad-card:not([data-is-ad="true"]) .sp-ad-image {
        width: 128px;
        min-width: 128px;
        max-width: 128px;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        margin: 6px;
        align-self: stretch;
    }

    .sp-ad-body {
        padding: 12px 12px 12px 4px;
        gap: 8px;
    }

    .sp-ad-title {
        font-size: 21px;
        line-height: 1.45;
    }

    .sp-ad-meta-tag {
        font-size: 12px;
    }

    .sp-ad-spec-tag {
        font-size: 12px;
    }

    .sp-price-amount {
        font-size: 16px;
    }

    .sp-ad-card[data-is-ad="true"] .sp-badge-ad {
        min-width: 28px;
        min-height: 28px;
        padding: 3px 8px !important;
    }

        .sp-ad-card[data-is-ad="true"] .sp-badge-ad svg {
            width: 12px;
            height: 12px;
        }
}

/* موبایل - 1 ستون (افقی) */
@media (max-width: 768px) {
    .sp-container {
        padding: 8px 10px 20px;
    }

    .sp-ads-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sp-ad-card,
    .sp-ad-link {
        height: auto;
        min-height: 112px;
        max-height: none;
        border: 1px solid #E6E8EC;
    }

    .sp-ad-card[data-is-ad="true"],
    .sp-ad-card[data-is-ad="true"] .sp-ad-link {
        height: auto;
        min-height: 0;
        max-height: none;
        align-self: stretch;
    }

    .sp-ad-link {
        flex-direction: row !important;
    }

    .sp-ad-card:not([data-is-ad="true"]) .sp-ad-image {
        width: 124px !important;
        min-width: 124px !important;
        max-width: 124px !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
        margin: 6px !important;
        border-radius: 14px;
        flex-shrink: 0;
        align-self: stretch;
        position: relative;
    }

    .sp-ad-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sp-ad-body {
        flex: 1;
        padding: 12px 14px 12px 4px;
        gap: 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .sp-ad-title {
        font-size: 20px !important;
        font-weight: 800 !important;
        line-height: 1.45 !important;
        min-height: auto !important;
        -webkit-line-clamp: 2;
        color: #111111 !important;
        margin-bottom: 0 !important;
    }

    .sp-ad-spec-tag.sp-ad-spec-size {
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1.3 !important;
    }

    .sp-ad-meta-tag {
        font-size: 12px;
        padding: 2px 10px;
    }

    .sp-ad-specs-mini {
        gap: 6px;
        padding-top: 0;
        margin-top: 0;
    }

    .sp-ad-spec-tag {
        font-size: 12px;
        padding: 2px 8px;
    }

    .sp-price-amount {
        font-size: 16px;
        font-weight: 800;
    }

    .sp-price-negotiable {
        font-size: 14px;
    }

    .sp-price-none {
        font-size: 13px;
    }

    .sp-ad-badges {
        top: 4px;
        right: 4px;
        gap: 2px;
    }

    .sp-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .sp-badge-ad {
        min-width: 24px;
        min-height: 24px;
        padding: 3px 6px !important;
    }

        .sp-badge-ad svg {
            width: 10px;
            height: 10px;
        }

    .sp-image-count {
        font-size: 9px;
        padding: 2px 6px;
        bottom: 4px;
        left: 4px;
    }

    .sp-ad-card[data-is-ad="true"] .sp-ad-link {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none;
        position: relative;
    }

    .sp-ad-card[data-is-ad="true"] .sp-ad-image {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 0;
        aspect-ratio: auto !important;
    }

        .sp-ad-card[data-is-ad="true"] .sp-ad-image img {
            position: absolute !important;
            object-fit: contain;
            width: 100%;
            height: 100%;
            display: block;
        }

    .sp-ad-card[data-is-ad="true"] .sp-ad-body {
        display: none !important;
    }

    .sp-ad-card[data-is-ad="true"]::before {
        width: 3px;
    }

    .sp-ad-card[data-is-ad="true"] .sp-badge-ad {
        min-width: 24px;
        min-height: 24px;
        padding: 2px 6px !important;
    }

        .sp-ad-card[data-is-ad="true"] .sp-badge-ad svg {
            width: 10px;
            height: 10px;
        }

    /* جستجو */
    .sp-search-minimal {
        padding: 14px 16px 12px;
        border-radius: 16px;
        gap: 10px;
    }

        .sp-search-minimal form {
            gap: 10px;
        }

    .sp-search-actions-row {
        gap: 8px;
    }

    .sp-search-input-wrap input {
        min-height: 48px;
        font-size: 1rem;
        padding: 12px 16px;
        padding-right: 44px;
        border-radius: 12px;
    }

    .sp-btn-search,
    .sp-btn-city,
    .sp-btn-filter-toggle {
        min-height: 48px;
        font-size: 0.9rem;
        padding: 0 14px;
        border-radius: 12px;
        flex: 1 1 auto;
    }

        .sp-btn-city .sp-city-label,
        .sp-btn-city .sp-hood-label {
            max-width: none;
            font-size: 0.95rem;
            font-weight: 700;
        }

        .sp-btn-city .sp-city-icon svg {
            width: 16px;
            height: 16px;
        }

        .sp-btn-city .sp-city-clear {
            width: 18px;
            height: 18px;
        }

    /* مودال شهر و فیلتر */
    .sp-location-modal {
        padding: 16px;
        align-items: center;
    }

    .sp-city-list,
    .sp-neighborhood-list {
        grid-template-columns: 1fr;
        max-height: 220px;
    }

    .sp-location-modal-content {
        border-radius: 16px;
        margin: 0;
        max-height: 90vh;
        width: 100%;
    }

    .sp-location-modal-header {
        padding: 14px 18px;
    }

        .sp-location-modal-header h3 {
            font-size: 1rem;
        }

    .sp-location-modal-body {
        padding: 14px 16px 16px;
    }

    .sp-filter-size-row {
        grid-template-columns: 1fr;
    }

    .sp-hood-cta {
        min-height: 58px;
        padding: 12px 12px;
    }

    .sp-hood-cta-text strong {
        font-size: 1rem;
    }

    .sp-float-field input {
        font-size: 1rem;
        min-height: 52px;
    }

    .sp-float-field label {
        font-size: 1rem;
    }

    .sp-search-suggest {
        border-radius: 14px;
    }

    .sp-location-modal-footer {
        padding: 12px 16px 14px;
        flex-direction: column;
        align-items: stretch;
    }

        .sp-location-modal-footer .sp-location-actions {
            justify-content: stretch;
        }

        .sp-location-modal-footer button {
            flex: 1;
            padding: 10px 16px;
            font-size: 0.9rem;
            min-height: 44px;
        }

    .sp-pagination-link {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .sp-modal-lightbox {
        max-width: 96vw;
    }

        .sp-modal-lightbox .swiper-button-next, .sp-modal-lightbox .swiper-button-prev {
            width: 32px;
            height: 32px;
        }

            .sp-modal-lightbox .swiper-button-next:after, .sp-modal-lightbox .swiper-button-prev:after {
                font-size: 12px;
            }

    .sp-modal-close {
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .sp-container {
        padding: 6px 6px 14px;
    }

    .sp-ads-grid {
        gap: 10px;
    }

    .sp-ad-card,
    .sp-ad-link {
        height: auto;
        min-height: 108px;
        max-height: none;
    }

    .sp-ad-card[data-is-ad="true"],
    .sp-ad-card[data-is-ad="true"] .sp-ad-link {
        height: auto;
        min-height: 0;
        max-height: none;
        align-self: stretch;
    }

    .sp-ad-card:not([data-is-ad="true"]) .sp-ad-image {
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
        margin: 6px !important;
        border-radius: 12px;
        align-self: stretch;
    }

    .sp-ad-title {
        font-size: 19px !important;
        line-height: 1.45 !important;
        font-weight: 800 !important;
    }

    .sp-ad-spec-tag.sp-ad-spec-size {
        font-size: 15px !important;
    }

    .sp-ad-body {
        padding: 10px 10px 10px 4px;
        gap: 8px;
    }

    .sp-ad-meta-tag {
        font-size: 12px;
        padding: 2px 8px;
    }

    .sp-ad-spec-tag:not(.sp-ad-spec-size) {
        font-size: 14px;
        padding: 2px 6px;
    }

    .sp-price-amount {
        font-size: 15px;
    }

    .sp-price-negotiable {
        font-size: 14px;
    }

    .sp-ad-card[data-is-ad="true"] .sp-ad-link {
        min-height: 0 !important;
        height: auto !important;
    }

    .sp-ad-card[data-is-ad="true"] .sp-ad-image {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 0;
        aspect-ratio: auto !important;
        position: absolute !important;
        height: 100% !important;
    }

    .sp-ad-card[data-is-ad="true"] .sp-ad-image img {
        position: absolute !important;
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .sp-ad-card[data-is-ad="true"] .sp-badge-ad {
        min-width: 20px;
        min-height: 20px;
        padding: 2px 5px !important;
    }

        .sp-ad-card[data-is-ad="true"] .sp-badge-ad svg {
            width: 9px;
            height: 9px;
        }

    /* جستجو */
    .sp-search-minimal {
        padding: 12px 12px 10px;
    }

    .sp-search-actions-row {
        gap: 6px;
    }

    .sp-search-input-wrap input {
        min-height: 48px;
        font-size: 1rem;
        padding: 10px 14px;
        padding-right: 40px;
        border-radius: 10px;
    }

    .sp-btn-search,
    .sp-btn-city,
    .sp-btn-filter-toggle {
        min-height: 46px;
        font-size: 0.85rem;
        padding: 0 10px;
    }

        .sp-btn-city .sp-city-label,
        .sp-btn-city .sp-hood-label {
            max-width: none;
            font-size: 0.92rem;
            font-weight: 700;
        }

        .sp-btn-city .sp-city-icon svg {
            width: 16px;
            height: 16px;
        }

        .sp-btn-city .sp-city-clear {
            width: 16px;
            height: 16px;
        }

        .sp-btn-city .sp-city-arrow svg {
            width: 12px;
            height: 12px;
        }

    /* مودال شهر */
    .sp-location-modal {
        padding: 16px;
    }

    .sp-location-modal-content {
        border-radius: 16px;
        margin: 0;
        max-height: 90vh;
    }

    .sp-location-modal-header {
        padding: 12px 16px;
    }

        .sp-location-modal-header h3 {
            font-size: 1rem;
        }

    .sp-location-modal-body {
        padding: 12px 16px 14px;
    }

    .sp-city-item,
    .sp-neighborhood-item {
        font-size: 0.9rem;
        padding: 10px 10px;
    }

    .sp-location-modal-footer {
        padding: 12px 16px 14px;
    }

    .sp-pagination-link {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
    }
}
/* ========================================
   استایل‌های دسته‌بندی استان در مودال شهر
   ======================================== */

.sp-province-group {
    margin-bottom: 6px;
    border: 1px solid #E8EAED;
    border-radius: 10px;
    overflow: hidden;
    background: #FFFFFF;
}

.sp-province-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    background: #F8FAFC;
    transition: background 0.2s ease;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
    user-select: none;
}

    .sp-province-header:hover {
        background: #F1F5F9;
    }

.sp-province-toggle {
    font-size: 12px;
    color: #94A3B8;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.sp-province-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F172A;
    flex: 1;
}

.sp-province-count {
    font-size: 0.75rem;
    color: #94A3B8;
    background: #F1F5F9;
    padding: 2px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.sp-province-select-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1E88E5;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

    .sp-province-select-all:hover {
        background: #E3F2FD;
    }

.sp-province-cities {
    padding: 4px 8px 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #FFFFFF;
}

.sp-city-modal-content .sp-city-list {
    display: block;
    max-height: min(450px, 55vh);
    overflow-y: auto;
    padding: 2px 0;
}

.sp-city-modal-content .sp-city-item {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

    .sp-city-modal-content .sp-city-item:hover {
        background: #F8FAFC;
        border-color: #E8EAED;
    }

    .sp-city-modal-content .sp-city-item.selected {
        background: #E3F2FD;
        border-color: #1E88E5;
        color: #1565C0;
    }

    .sp-city-modal-content .sp-city-item input[type="checkbox"] {
        width: 17px;
        height: 17px;
        accent-color: #1E88E5;
        flex-shrink: 0;
        cursor: pointer;
    }

.sp-select-all-cities {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 2px solid #1E88E5;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
    color: #1565C0;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .sp-select-all-cities:hover {
        background: linear-gradient(135deg, #BBDEFB, #90CAF9);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(30, 136, 229, 0.20);
    }

.sp-select-all-count {
    font-size: 0.8rem;
    color: #1565C0;
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 10px;
    border-radius: 12px;
}

/* ===== استایل‌های مودال شهر در موبایل ===== */
@media (max-width: 768px) {
    .sp-province-cities {
        grid-template-columns: 1fr;
        padding: 4px 4px 8px;
    }

    .sp-province-header {
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .sp-province-name {
        font-size: 0.85rem;
    }

    .sp-province-select-all {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    .sp-select-all-cities {
        font-size: 0.85rem;
        padding: 8px 12px;
        margin-bottom: 10px;
    }

    .sp-city-modal-content .sp-city-item {
        padding: 10px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sp-province-cities {
        grid-template-columns: 1fr;
    }

    .sp-province-header {
        padding: 6px 8px;
        gap: 4px;
    }

    .sp-province-name {
        font-size: 0.8rem;
    }

    .sp-province-count {
        font-size: 0.65rem;
        padding: 1px 8px;
    }

    .sp-province-select-all {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}
/* ========================================
   استایل‌های انتخاب شهر - شبیه دیوار
   ======================================== */

.sp-city-modal-content .sp-city-list {
    display: block;
    max-height: min(480px, 58vh);
    overflow-y: auto;
    padding: 4px 0;
    direction: rtl;
}

/* گروه استان */
.sp-province-group {
    margin-bottom: 4px;
    border: 1px solid #E8EAED;
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
}

    .sp-province-group:hover {
        border-color: #CBD5E1;
    }

/* هدر استان */
.sp-province-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    background: #F8FAFC;
    transition: background 0.2s ease;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
    user-select: none;
    min-height: 40px;
}

    .sp-province-header:hover {
        background: #F1F5F9;
    }

.sp-province-toggle {
    font-size: 10px;
    color: #94A3B8;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.sp-province-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0F172A;
    flex: 1;
}

.sp-province-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748B;
    background: #F1F5F9;
    padding: 1px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    min-width: 24px;
    text-align: center;
}

.sp-province-select-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1E88E5;
    cursor: pointer;
    padding: 2px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    border: 1px solid transparent;
}

    .sp-province-select-all:hover {
        background: #E3F2FD;
        border-color: #BFDBFE;
    }

/* لیست شهرهای هر استان - 2 ستون */
.sp-province-cities {
    padding: 4px 6px 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #FFFFFF;
}

/* آیتم شهر */
.sp-city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #1a1a1a;
    border: 1px solid transparent;
    font-family: var(--sp-font, 'Shabnam', sans-serif);
    min-height: 46px;
}

    .sp-city-item:hover {
        background: #F8FAFC;
        border-color: #E8EAED;
    }

    .sp-city-item.selected {
        background: #E3F2FD;
        border-color: #1E88E5;
    }

        .sp-city-item.selected .sp-city-name {
            color: #1565C0;
            font-weight: 600;
        }

.sp-city-checkbox {
    font-size: 14px;
    color: #94A3B8;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: color 0.2s ease;
}

.sp-city-item.selected .sp-city-checkbox {
    color: #1E88E5;
}

.sp-city-item .sp-city-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.sp-city-empty {
    padding: 30px 20px;
    text-align: center;
    color: #94A3B8;
    font-size: 0.9rem;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
}

/* فیلد جستجوی شهر - ساده شده */
.sp-city-search-wrap {
    position: relative;
    margin-bottom: 12px;
}

    .sp-city-search-wrap input {
        width: 100%;
        padding: 10px 16px;
        padding-right: 44px;
        border: 2px solid #E8EAED;
        border-radius: 10px;
        font-size: 0.95rem;
        font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
        outline: none;
        transition: all 0.3s ease;
        background: #F8FAFC;
        color: #1a1a1a;
        direction: rtl;
        min-height: 44px;
    }

        .sp-city-search-wrap input:focus {
            border-color: #1E88E5;
            background: #FFFFFF;
            box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.08);
        }

        .sp-city-search-wrap input::placeholder {
            color: #94A3B8;
            font-weight: 400;
        }

.sp-city-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}

    .sp-city-search-icon svg {
        width: 18px;
        height: 18px;
    }

/* خلاصه انتخاب‌ها */
.sp-selected-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #64748B;
    font-family: var(--sp-font, 'VazirFD', 'IRANSans', 'Shabnam', sans-serif);
    flex-wrap: wrap;
}

.sp-summary-label {
    font-weight: 500;
    color: #64748B;
}

.sp-summary-cities {
    font-weight: 700;
    color: #0F172A;
    font-size: 0.9rem;
}

/* ========================================
   استایل‌های موبایل - 2 ستون ثابت
   ======================================== */

@media (max-width: 768px) {
    .sp-province-header {
        padding: 6px 10px;
        min-height: 36px;
        gap: 4px;
    }

    .sp-province-name {
        font-size: 0.85rem;
    }

    .sp-province-count {
        font-size: 0.65rem;
        padding: 1px 8px;
        min-width: 20px;
    }

    .sp-province-toggle {
        font-size: 9px;
        width: 14px;
    }

    .sp-province-select-all {
        font-size: 0.7rem;
        padding: 1px 8px;
    }

    /* 2 ستون در موبایل */
    .sp-province-cities {
        grid-template-columns: 1fr 1fr;
        padding: 4px 4px 8px;
        gap: 2px;
    }

    .sp-city-item {
        padding: 5px 8px;
        min-height: 30px;
        gap: 6px;
    }

        .sp-city-item .sp-city-name {
            font-size: 0.8rem;
        }

    .sp-city-checkbox {
        font-size: 13px;
        width: 18px;
    }

    .sp-city-search-wrap input {
        font-size: 0.9rem;
        min-height: 40px;
        padding: 8px 14px;
        padding-right: 40px;
        border-radius: 8px;
    }

    .sp-city-search-icon {
        right: 12px;
    }

        .sp-city-search-icon svg {
            width: 16px;
            height: 16px;
        }

    .sp-city-modal-content .sp-city-list {
        max-height: min(380px, 50vh);
    }

    .sp-summary-cities {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .sp-province-header {
        padding: 5px 8px;
        min-height: 32px;
        gap: 3px;
    }

    .sp-province-name {
        font-size: 0.8rem;
    }

    .sp-province-count {
        font-size: 0.6rem;
        padding: 1px 6px;
        min-width: 18px;
    }

    .sp-province-toggle {
        font-size: 8px;
        width: 12px;
    }

    .sp-province-select-all {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    /* 2 ستون در موبایل کوچک */
    .sp-province-cities {
        grid-template-columns: 1fr 1fr;
        padding: 2px 2px 6px;
        gap: 1px;
    }

    .sp-city-item {
        padding: 4px 6px;
        min-height: 28px;
        gap: 4px;
        border-radius: 4px;
    }

        .sp-city-item .sp-city-name {
            font-size: 0.75rem;
        }

    .sp-city-checkbox {
        font-size: 12px;
        width: 16px;
    }

    .sp-city-search-wrap input {
        font-size: 0.85rem;
        min-height: 36px;
        padding: 6px 12px;
        padding-right: 36px;
        border-radius: 6px;
    }

    .sp-city-search-icon {
        right: 10px;
    }

        .sp-city-search-icon svg {
            width: 14px;
            height: 14px;
        }

    .sp-city-modal-content .sp-city-list {
        max-height: min(320px, 45vh);
    }

    .sp-summary-cities {
        font-size: 0.8rem;
    }

    .sp-selected-summary {
        font-size: 0.8rem;
        gap: 4px;
    }
}

/* ========================================
   جداسازی استان / شهر / محله — شبیه دیوار
   ======================================== */

.sp-location-flat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(480px, 58vh);
    overflow-y: auto;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
}

.sp-location-flat-list .sp-city-item {
    min-height: 56px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #EEF2F6;
    gap: 12px;
}

.sp-location-flat-list .sp-city-name {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.5;
    color: #0F172A;
}

.sp-location-flat-list .sp-city-checkbox {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sp-neighborhood-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: min(420px, 52vh);
    grid-template-columns: none;
}

.sp-neighborhood-item {
    min-height: 56px;
    padding: 12px 14px;
    border-radius: 14px;
}

.sp-neighborhood-item .sp-hood-name {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.5;
    color: #0F172A;
}

.sp-neighborhood-item .sp-hood-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
}

.sp-hood-city-chip {
    font-size: 0.95rem;
    font-weight: 800;
    padding: 8px 14px;
}

@media (max-width: 768px) {
    .sp-location-actions-row {
        gap: 8px;
    }

        .sp-location-actions-row .sp-btn-city {
            padding: 0 10px;
            min-height: 50px;
        }

    .sp-btn-city .sp-city-label,
    .sp-btn-city .sp-hood-label {
        max-width: none;
        font-size: 0.95rem;
        font-weight: 800;
    }

    .sp-location-modal {
        padding: 0;
        align-items: flex-end;
        justify-content: stretch;
    }

    .sp-location-modal-content:not(.sp-filters-modal-content),
    .sp-city-modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        height: 92vh;
        border-radius: 20px 20px 0 0;
        margin: 0;
    }

    .sp-location-modal-header {
        padding: 18px 18px 14px;
    }

        .sp-location-modal-header h3 {
            font-size: 1.3rem;
            font-weight: 800;
        }

    .sp-location-modal-body {
        padding: 16px 16px 20px;
    }

    .sp-location-flat-list {
        max-height: none;
        flex: 1;
    }

    .sp-location-flat-list .sp-city-item {
        min-height: 56px;
        padding: 14px 14px;
    }

    .sp-location-flat-list .sp-city-name {
        font-size: 1.15rem;
    }

    .sp-city-search-wrap input {
        min-height: 48px;
        font-size: 1.05rem;
        padding: 12px 16px;
        padding-right: 46px;
        border-radius: 12px;
    }

    .sp-city-modal-content .sp-city-list {
        max-height: none;
    }

    .sp-neighborhood-list {
        max-height: none;
        grid-template-columns: 1fr;
    }

    .sp-neighborhood-item {
        min-height: 56px;
        padding: 12px 12px;
        font-size: 1rem;
    }

        .sp-neighborhood-item .sp-hood-name {
            font-size: 1.1rem;
        }

    .sp-select-all-cities {
        min-height: 48px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .sp-location-modal-footer {
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    }

        .sp-location-modal-footer button {
            min-height: 48px;
            font-size: 1rem;
            font-weight: 800;
        }
}

@media (max-width: 480px) {
    .sp-location-actions-row {
        gap: 6px;
    }

        .sp-location-actions-row .sp-btn-city {
            padding: 0 8px;
            min-height: 48px;
            gap: 4px;
        }

            .sp-location-actions-row .sp-btn-city .sp-city-arrow {
                display: none;
            }

    .sp-btn-city .sp-city-label,
    .sp-btn-city .sp-hood-label {
        font-size: 0.9rem;
        font-weight: 800;
        max-width: none;
    }

    .sp-location-modal-content:not(.sp-filters-modal-content),
    .sp-city-modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .sp-location-modal-header h3 {
        font-size: 1.25rem;
    }

    .sp-location-flat-list .sp-city-item {
        min-height: 54px;
    }

    .sp-location-flat-list .sp-city-name,
    .sp-neighborhood-item .sp-hood-name {
        font-size: 1.12rem;
    }

    .sp-city-item {
        min-height: 54px;
        padding: 12px 12px;
    }

        .sp-city-item .sp-city-name {
            font-size: 1.12rem;
        }
}