/* County pages: "Selected South Florida Transactions" slider. */

.sold-tx {
    --sold-tx-green: #00461c;
    --sold-tx-mint: #cdeedd;
    --sold-tx-gap: 24px;
    --sold-tx-per-view: 3;
    --sold-tx-tomato: #00461C;
    /* Matches the page's other sections (.selling-process). */
    padding: 60px 20px;
    background: #fff;
    color: #2a2a2a;
}

/* Title + lede come from the page's own .section-mini-title / .sp-section-lede. */
.sold-tx .sp-section-lede {
    margin-bottom: 28px;
}

/* The heading column is 1260px; the carousel is wider by the two arrow
   columns (2 x 60px) so the card track itself spans the full 1260px. */
.sold-tx__inner {
    max-width: 1380px;
    margin: 0 auto;
    text-align: center;
}

.sold-tx__carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sold-tx__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    /* room for the card's top bar + shadow without clipping */
    padding: 2px 2px 6px;
}

.sold-tx__track {
    display: flex;
    gap: var(--sold-tx-gap);
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    touch-action: pan-y;
}

.sold-tx__slide {
    flex: 0 0 calc((100% - (var(--sold-tx-per-view) - 1) * var(--sold-tx-gap)) / var(--sold-tx-per-view));
    min-width: 0;
    display: flex;
}

.sold-tx__card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 26px 24px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--sold-tx-mint);
    border-top: 5px solid var(--sold-tx-green);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sold-tx__badge {
    display: inline-block;
    padding: 5px 14px;
    color: var(--sold-tx-green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #d6f5e3;
    border-radius: 999px;
}

/* typography.css forces `body h3` / `body p` sizes with !important, so the card's
   own sizes need !important too (scoped to the card, so nothing else changes). */
.sold-tx .sold-tx__name {
    margin: 14px 0 0;
    color: var(--sold-tx-green);
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.sold-tx__body {
    flex: 1 1 auto;
    width: 100%;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--sold-tx-mint);
}

.sold-tx .sold-tx__price {
    margin: 0 0 12px;
    text-align: center;
    color: var(--sold-tx-tomato);
    font-size: 36px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.01em;
}

.sold-tx__desc {
    margin: 0;
    color: #5b6470;
    font-size: 16px;
    line-height: 1.55;
}

/* Buyer type: label on the left, value on the right, one row. */
.sold-tx__side {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--sold-tx-mint);
    font-size: 15px;
}

.sold-tx__side-label {
    color: #5b6470;
}

.sold-tx__side-value {
    color: var(--sold-tx-green);
    font-weight: 700;
    text-align: right;
}

.sold-tx .sold-tx__cta {
    margin-top: 32px;
}

.sold-tx__arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: var(--sold-tx-green);
    background: #fff;
    border: 1px solid var(--sold-tx-mint);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sold-tx__arrow:hover {
    background: #ecfdf5;
    border-color: var(--sold-tx-green);
}

.sold-tx__arrow:focus-visible {
    outline: 3px solid #00461C;
    outline-offset: 2px;
}

/* Static fallback: one page of cards, nothing to slide. */
.sold-tx__carousel[data-static] .sold-tx__arrow {
    display: none;
}

@media (max-width: 1000px) {
    .sold-tx {
        --sold-tx-per-view: 2;
    }
}

@media (max-width: 640px) {
    .sold-tx {
        --sold-tx-per-view: 1;
        padding: 40px 16px 48px;
    }

    .sold-tx__arrow {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 40px;
        height: 40px;
        transform: translateY(-50%);
    }

    .sold-tx__arrow--prev {
        left: -6px;
    }

    .sold-tx__arrow--next {
        right: -6px;
    }

    .sold-tx__viewport {
        padding-inline: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sold-tx__track {
        transition: none;
    }
}
