/* ═══════════════════════════════════════════════════════════
   PLW Property Carousel v2.0 — Clean card style
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

.plwc-wrapper {
    font-family: 'DM Sans', -apple-system, sans-serif;
    color: #1a1a1a;
    padding-bottom: 8px;
}

/* ── HEADER ──────────────────────────────────────────────── */
.plwc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.plwc-header__left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.plwc-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
    /* Removed !important rules here so Elementor typography and color applies cleanly */
    text-transform: none;
    letter-spacing: normal;
}

.plwc-section-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.plwc-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.plwc-see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #f97316;
    border: 1.5px solid #f97316;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s, color .18s, transform .12s;
    background: transparent;
    line-height: 1;
    text-transform: none !important;
    letter-spacing: normal !important;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    cursor: pointer;
}
.plwc-see-more:focus { outline: none; box-shadow: none; }
.plwc-see-more svg { display: block; flex-shrink: 0; stroke: currentColor; }
.plwc-see-more:hover {
    background: transparent;
    color: #111827;
    border-color: #111827;
    text-decoration: none;
}
.plwc-see-more:active {
    transform: scale(.95);
    background: transparent;
    color: #374151;
    border-color: #374151;
    outline: none;
    box-shadow: none;
}

/* Arrow pair in header */
.plwc-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── TABS ────────────────────────────────────────────────── */
.plwc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.plwc-tab {
    height: 34px;
    padding: 0 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.plwc-tab:hover:not(.active) { border-color: #d1d5db; color: #374151; background: #f9fafb; }
.plwc-tab.active {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

/* ── CAROUSEL LAYOUT ─────────────────────────────────────── */
.plwc-carousel-outer {
    position: relative;
    width: 100%;
}

.plwc-track-wrap {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.plwc-track-wrap:active { cursor: grabbing; }

.plwc-track {
    display: flex;
    gap: var(--card-gap, 16px);
    transition: transform .40s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
    padding-bottom: 4px; /* prevent box-shadow clipping */
}

/* ── CARD ────────────────────────────────────────────────── */
.plwc-card {
    flex: 0 0 var(--card-w, 280px);
    width: var(--card-w, 280px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .25s;
    animation: plwc-in .32s ease both;
}
.plwc-card:hover {
    text-decoration: none;
}

@keyframes plwc-in {
    from { opacity:0; transform: translateY(12px); }
    to   { opacity:1; transform: translateY(0); }
}
.plwc-card:nth-child(1)  { animation-delay: .00s; }
.plwc-card:nth-child(2)  { animation-delay: .05s; }
.plwc-card:nth-child(3)  { animation-delay: .10s; }
.plwc-card:nth-child(4)  { animation-delay: .15s; }
.plwc-card:nth-child(5)  { animation-delay: .20s; }
.plwc-card:nth-child(n+6){ animation-delay: .22s; }

/* ── IMAGE — strict 16:9, all corners rounded ────────────── */
.plwc-card__img-wrap {
    position: relative;
    width: calc(100% - 16px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 12px; /* all 4 corners */
    flex-shrink: 0;
    margin: 8px 8px 0;
    align-self: center; /* ensures width respected in flex column */
}

.plwc-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.plwc-card:hover .plwc-card__img { transform: none; }

/* ── STATS ROW — below image, not overlaid ───────────────── */
.plwc-card__stats {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 12px 0;
    flex-wrap: wrap;
}

.plwc-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 26px;
    padding: 0 8px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    flex-shrink: 1; /* allow shrinking */
    min-width: 0;
}

.plwc-stat svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    stroke: #6b7280;
    stroke-width: 2;
}

/* ── CARD BODY ───────────────────────────────────────────── */
.plwc-card__body {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    background: #fff;
}

.plwc-card__title {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.35;
    text-transform: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plwc-card__address {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plwc-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #f97316;
    margin: 0;
}

/* ── FOOTER ROW: price + view button ────────────────────── */
.plwc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.plwc-card__view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f97316;
    color: #fff;
    text-decoration: none;
    transition: background .18s, transform .15s;
    flex-shrink: 0;
    outline: none;           /* remove browser focus ring */
    -webkit-tap-highlight-color: transparent; /* no blue on mobile tap */
    user-select: none;
}
.plwc-card__view:focus { outline: none; }
.plwc-card__view:hover { background: #ea6c0a; transform: scale(1.08); text-decoration: none; color: #fff; }
.plwc-card__view:active { transform: scale(.94); background: #ea6c0a; outline: none; }

/* ── ARROWS (top-right in header) ───────────────────────── */
.plwc-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: background .18s, border-color .18s, color .18s;
    flex-shrink: 0;
}
.plwc-arrow svg { display: block; }
.plwc-arrow:hover:not(:disabled) {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}
.plwc-arrow:disabled { opacity: .3; cursor: default; }

/* ── LOADING / EMPTY ─────────────────────────────────────── */
.plwc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
}
.plwc-spinner {
    width: 28px; height: 28px;
    border: 3px solid #f3f4f6;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: plwc-spin .7s linear infinite;
}
@keyframes plwc-spin { to { transform: rotate(360deg); } }

.plwc-empty {
    font-size: 13px;
    color: #9ca3af;
    padding: 48px 20px;
    text-align: center;
    width: 100%;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .plwc-section-title { font-size: 17px; }
    .plwc-section-desc  { font-size: 12px; }
    .plwc-arrow { width: 28px; height: 28px; }
    .plwc-see-more { height: 28px; padding: 0 11px; font-size: 11.5px; }
}

@media (max-width: 480px) {
    .plwc-header { margin-bottom: 12px; }
    .plwc-section-title { font-size: 15px; }
    .plwc-see-more { height: 26px; padding: 0 10px; font-size: 11px; }
    .plwc-arrow { width: 26px; height: 26px; }
    .plwc-nav { gap: 4px; }
    /* Native scroll on very small screens */
    .plwc-track-wrap {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .plwc-track-wrap::-webkit-scrollbar { display: none; }
    .plwc-track { transition: none; }
    .plwc-card  { scroll-snap-align: start; }
}

/* ═══════════════════════════════════════════════════════════
   GRID MODE
═══════════════════════════════════════════════════════════ */
.plwc-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
    gap: var(--grid-gap, 16px);
}

/* Grid cards fill full column width */
.plwc-mode-grid .plwc-card {
    width: 100%;
    flex: unset;
}

/* Tablet */
@media (max-width: 840px) {
    .plwc-grid { grid-template-columns: repeat(var(--grid-cols-tab, 2), 1fr); }
}

/* Mobile */
@media (max-width: 540px) {
    .plwc-grid { grid-template-columns: repeat(var(--grid-cols-mob, 1), 1fr); }

    /* 2-col grid = narrow cards — shrink stats pills further */
    .plwc-mode-grid .plwc-card__stats {
        gap: 4px;
        padding: 8px 8px 0;
    }
    .plwc-mode-grid .plwc-stat {
        height: 22px;
        padding: 0 6px;
        font-size: 9.5px;
        gap: 2px;
    }
    .plwc-mode-grid .plwc-stat svg {
        width: 9px;
        height: 9px;
    }
    .plwc-mode-grid .plwc-card__body {
        padding: 8px 10px 10px;
    }
    .plwc-mode-grid .plwc-card__title {
        font-size: 12px;
    }
    .plwc-mode-grid .plwc-card__price {
        font-size: 13px;
    }
    .plwc-mode-grid .plwc-card__view {
        width: 22px;
        height: 22px;
    }
}

/* ── Unit label toggle: sqft default, ft² on narrow 2-col mobile grid ── */
.plwc-stat__short { display: none; }
.plwc-stat__long  { display: inline; }

@media (max-width: 540px) {
    .plwc-mode-grid .plwc-stat__long  { display: none; }
    .plwc-mode-grid .plwc-stat__short { display: inline; }
}