﻿/* ==========================================================================
   "My Listings" carousel
   Cards per slide: desktop 3 / tablet 2 (< 992px) / mobile 1 (< 576px).
   Arrows: desktop only. Tablet & mobile: swipe + dots.
   Same colours as the other sections (reviews carousel, search results).
   ========================================================================== */
.lc {
    --lc-per-view: 3;
    --lc-gap: 24px;
    --lc-purple: #6b5fa8;
    --lc-border: #b9b0dc;
    --lc-orange: #f47b20;
    --lc-dark: #2b2b2b;
    --lc-text: #555;
    --lc-line: #e6e6e6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 0px;
    box-sizing: border-box;
}

    .lc *, .lc *::before, .lc *::after {
        box-sizing: border-box;
    }

    .lc [hidden] {
        display: none !important;
    }

@media (max-width: 991.98px) {
    .lc {
        --lc-per-view: 2;
        --lc-gap: 20px;
    }
}

@media (max-width: 575.98px) {
    .lc {
        --lc-per-view: 1;
        --lc-gap: 16px;
    }
}

/* ---------- Header ---------- */
.lc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.lc-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: var(--lc-dark);
}

.lc-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--lc-border);
    border-radius: 999px;
    background: #fff;
    color: var(--lc-purple);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

    .lc-pill svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .lc-pill:hover {
        border-color: var(--lc-purple);
        background: #f6f4fb;
    }

    .lc-pill:focus-visible {
        outline: 2px solid var(--lc-purple);
        outline-offset: 2px;
    }

.lc-chev {
    width: 12px !important;
    height: 12px !important;
    transition: transform .2s;
}

.lc-filter-btn[aria-expanded="true"] .lc-chev {
    transform: rotate(180deg);
}

.lc-filter {
    position: relative;
}

.lc-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 100%;
    width: 140px;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

    .lc-menu button {
        display: block;
        width: 100%;
        padding: 9px 12px;
        border: 0;
        border-radius: 6px;
        background: none;
        font: inherit;
        font-size: 13px;
        color: var(--lc-dark);
        text-align: left;
        cursor: pointer;
    }

        .lc-menu button:hover, .lc-menu button:focus-visible {
            outline: none;
            background: #f6f4fb;
            color: var(--lc-purple);
        }

        .lc-menu button[aria-checked="true"] {
            font-weight: 700;
            color: var(--lc-purple);
        }

/* ---------- Stage: [prev] [viewport] [next] ---------- */
.lc-stage {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lc-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding: 10px 0;
    touch-action: pan-y;
}

.lc-track {
    display: flex;
    gap: var(--lc-gap);
    transition: transform .45s ease;
    will-change: transform;
}

/* ---------- Card ---------- */
.lc-card {
    flex: 0 0 calc((100% - (var(--lc-per-view) - 1) * var(--lc-gap)) / var(--lc-per-view));
    border: 1px solid var(--lc-border);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}

    .lc-card:hover {
        border-color: var(--lc-purple);
        box-shadow: 0 6px 18px rgba(107, 95, 168, .15);
    }

.lc-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    -webkit-user-drag: none;
}

    .lc-link:focus-visible {
        outline: 2px solid var(--lc-purple);
        outline-offset: -3px;
        border-radius: 16px;
    }

.lc-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eee;
    overflow: hidden;
}

    .lc-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .4s ease;
    }

.lc-card:hover .lc-media img {
    transform: scale(1.04);
}

.lc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.lc-badge--sale {
    background: var(--lc-orange);
}

.lc-badge--rent {
    background: var(--lc-purple);
}

.lc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 16px 12px;
}

.lc-price {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    color: var(--lc-dark);
}

.lc-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--lc-dark);
}

.lc-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--lc-text);
}

    .lc-loc svg {
        width: 16px;
        height: 16px;
        color: var(--lc-orange);
        flex-shrink: 0;
    }

.lc-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    margin: auto 0 0;
    padding: 10px 0 0;
    list-style: none;
    border-top: 1px solid var(--lc-line);
    font-size: 11px;
    color: var(--lc-text);
}

    .lc-specs li {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 0 8px;
        border-left: 1px solid var(--lc-line);
        white-space: nowrap;
    }

        .lc-specs li:first-child {
            padding-left: 0;
            border-left: 0;
        }

    .lc-specs svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
    }

/* ---------- Arrows (desktop only) ---------- */
.lc-nav {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lc-purple);
    border-radius: 50%;
    background: #fff;
    color: var(--lc-purple);
    cursor: pointer;
    transition: background .2s, color .2s;
}

    .lc-nav:hover {
        background: var(--lc-purple);
        color: #fff;
    }

    .lc-nav:focus-visible {
        outline: 2px solid var(--lc-purple);
        outline-offset: 2px;
    }

    .lc-nav svg {
        width: 14px;
        height: 14px;
    }

@media (max-width: 991.98px) {
    .lc-nav {
        display: none !important;
    }
}

/* ---------- Dots (24px tap area, 8px visible dot) ---------- */
.lc-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 12px;
}

.lc-dot {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

    .lc-dot::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        margin: -4px 0 0 -4px;
        border: 1px solid var(--lc-purple);
        border-radius: 50%;
        box-sizing: border-box;
    }

    .lc-dot[aria-current="true"]::before {
        background: var(--lc-purple);
    }

    .lc-dot:focus-visible {
        outline: 2px solid var(--lc-purple);
        outline-offset: -4px;
        border-radius: 50%;
    }

.lc-empty, .lc-filter-empty {
    margin: 0;
    padding: 32px 16px;
    text-align: center;
    color: var(--lc-text);
    border: 1px dashed var(--lc-border);
    border-radius: 16px;
}

.lc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .lc {
        padding: 24px 16px;
    }

    .lc-pill {
        height: 34px;
        padding: 0 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lc-track, .lc-card, .lc-media img, .lc-nav, .lc-chev {
        transition: none;
    }
}
