/* crwr-public.css — Carolina Right Way Realty front-end styles */

/* =========================================================
   Base / Reset
   ========================================================= */
.crwr-listings-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.crwr-listings-wrap *,
.crwr-listings-wrap *::before,
.crwr-listings-wrap *::after {
    box-sizing: border-box;
}

.crwr-detail *,
.crwr-detail *::before,
.crwr-detail *::after {
    box-sizing: border-box;
}

/* =========================================================
   Property Detail Page — Wrapper
   ========================================================= */
.crwr-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

/* =========================================================
   Photo Gallery
   ========================================================= */
.crwr-detail-gallery {
    display: grid;
    grid-template-columns: 65% 35%;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    height: 480px;
}

.crwr-detail-gallery--empty {
    grid-template-columns: 1fr;
    grid-template-rows: 300px;
}

.crwr-detail-gallery-main {
    grid-row: 1 / 3; /* spans both rows */
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
}

.crwr-detail-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.crwr-detail-gallery-main:hover img {
    transform: scale(1.02);
}

.crwr-detail-gallery-nophoto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    gap: 12px;
    color: #9ca3af;
    font-size: 14px;
}

/* Gallery prev/next buttons */
.crwr-detail-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background-color 0.15s ease, opacity 0.2s ease;
    opacity: 0;
    z-index: 5;
}

.crwr-detail-gallery-main:hover .crwr-detail-gallery-nav {
    opacity: 1;
}

.crwr-detail-gallery-nav--prev { left: 12px; }
.crwr-detail-gallery-nav--next { right: 12px; }

.crwr-detail-gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
}

/* Photo counter badge */
.crwr-detail-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 4;
}

/* Thumbnail cells */
.crwr-detail-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-row: 1 / 3;
}

.crwr-detail-gallery-thumb {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    cursor: pointer;
    flex: 1;
}

.crwr-detail-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.crwr-detail-gallery-thumb:hover img {
    transform: scale(1.04);
}

/* "+N photos" overlay on the last visible thumbnail */
.crwr-detail-gallery-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
}

/* =========================================================
   Detail Content Area
   ========================================================= */
.crwr-detail-content {
    /* intentionally unstyled — children handle their own spacing */
}

/* =========================================================
   Header Row: Address + Price
   ========================================================= */
.crwr-detail-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.crwr-detail-street {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.crwr-detail-location {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.crwr-detail-price {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.1;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.crwr-detail-mls {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

/* =========================================================
   Quick Stats Bar
   ========================================================= */
.crwr-detail-stats {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 32px;
}

.crwr-detail-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    gap: 2px;
}

.crwr-detail-stat:last-child {
    border-right: none;
}

.crwr-detail-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.crwr-detail-stat span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================================================
   Two-Column Layout: Main + Sidebar
   ========================================================= */
.crwr-detail-columns {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
    align-items: start;
}

/* =========================================================
   Left Column — Main Content
   ========================================================= */
.crwr-detail-main h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.crwr-detail-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 36px;
}

.crwr-detail-desc p {
    margin: 0 0 1em;
}

/* Property Details key/value grid */
.crwr-detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.crwr-detail-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    gap: 8px;
}

.crwr-detail-info-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.crwr-detail-info-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.crwr-detail-info-value {
    font-size: 13px;
    color: #111827;
    font-weight: 600;
    text-align: right;
}

/* Map */
.crwr-detail-map {
    height: 300px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 32px;
    background: #f3f4f6;
}

/* =========================================================
   Right Column — Sidebar (sticky)
   ========================================================= */
.crwr-detail-sidebar {
    position: sticky;
    top: 24px;
}

.crwr-detail-agent-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.crwr-detail-agent-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

/* Agent info row */
.crwr-detail-agent-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.crwr-detail-agent-photo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.crwr-detail-agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crwr-detail-agent-initials {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.crwr-detail-agent-text {
    flex: 1;
    min-width: 0;
}

.crwr-detail-agent-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crwr-detail-agent-role {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.crwr-detail-agent-email {
    display: block;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crwr-detail-agent-email:hover {
    text-decoration: underline;
}

/* =========================================================
   Contact Form
   ========================================================= */
.crwr-contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.crwr-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crwr-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.crwr-required {
    color: #dc2626;
}

.crwr-contact-form input[type="text"],
.crwr-contact-form input[type="email"],
.crwr-contact-form input[type="tel"],
.crwr-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.crwr-contact-form input[type="text"]:focus,
.crwr-contact-form input[type="email"]:focus,
.crwr-contact-form input[type="tel"]:focus,
.crwr-contact-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.crwr-contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.crwr-contact-submit {
    width: 100%;
    padding: 12px 20px;
    background: #89ddfa;
    color: #111827;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
}

.crwr-contact-submit:hover {
    background: #6dcef5;
}

.crwr-contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.crwr-contact-disclaimer {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.crwr-contact-disclaimer a {
    color: #6b7280;
    text-decoration: underline;
}

/* Feedback messages */
.crwr-contact-feedback {
    display: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.crwr-contact-feedback--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.crwr-contact-feedback--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================
   Detail Page — Responsive
   ========================================================= */

/* Tablet: stack columns */
@media (max-width: 900px) {
    .crwr-detail-columns {
        grid-template-columns: 1fr;
    }

    .crwr-detail-sidebar {
        position: static; /* un-sticky on mobile */
    }
}

/* Tablet: gallery thumbs side by side instead of stacked */
@media (max-width: 900px) {
    .crwr-detail-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 140px;
        height: auto;
    }

    .crwr-detail-gallery-main {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .crwr-detail-gallery-thumbs {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        flex-direction: row;
    }

    .crwr-detail-gallery-thumb {
        flex: 1;
    }
}

/* Mobile: full-width single column gallery */
@media (max-width: 600px) {
    .crwr-detail {
        padding: 16px 16px 48px;
    }

    .crwr-detail-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 240px;
        border-radius: 8px;
    }

    .crwr-detail-gallery-main {
        grid-row: 1 / 2;
        grid-column: 1 / 2;
    }

    .crwr-detail-gallery-thumbs {
        display: none; /* hide thumbs on small screens — use counter instead */
    }

    .crwr-detail-price {
        font-size: 26px;
        flex-direction: column;
        gap: 4px;
    }

    .crwr-detail-street {
        font-size: 22px;
    }

    .crwr-detail-stats {
        flex-wrap: wrap;
    }

    .crwr-detail-stat {
        flex: 1 1 33%;
        border-bottom: 1px solid #e5e7eb;
    }

    .crwr-detail-info-grid {
        grid-template-columns: 1fr;
    }

    .crwr-detail-info-row:nth-last-child(-n+2) {
        border-bottom: 1px solid #f3f4f6;
    }

    .crwr-detail-info-row:last-child {
        border-bottom: none;
    }
}

/* =========================================================
   Empty State
   ========================================================= */
.crwr-empty {
    text-align: center;
    padding: 16px 24px 32px;
    color: #111827;
    font-size: 20px;
    font-weight: 500;
}

/* =========================================================
   Controls Bar
   ========================================================= */
.crwr-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    border-bottom: 4px solid #2c3e50;
}

.crwr-controls-count {
    font-size: 14px;
    color: #1e3a5f;
    font-weight: 600;
}

.crwr-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Sort Dropdown */
.crwr-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 32px 7px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s ease;
    min-width: 170px;
}

.crwr-sort-select:hover,
.crwr-sort-select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* View Toggle */
.crwr-view-toggle {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.crwr-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: none;
    border-right: 1px solid #d1d5db;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.crwr-view-btn:last-child {
    border-right: none;
}

.crwr-view-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.crwr-view-btn--active {
    background-color: #1e3a5f;
    color: #fff;
}

.crwr-view-btn--active:hover {
    background-color: #1a3254;
    color: #fff;
}

/* =========================================================
   Listings Grid
   ========================================================= */
.crwr-listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .crwr-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .crwr-listings-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Property Card
   ========================================================= */
.crwr-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.crwr-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* =========================================================
   Card Image / Carousel
   ========================================================= */
.crwr-card-image {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16 / 10;
}

/* No photo placeholder */
.crwr-card-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    min-height: 180px;
}

/* Carousel */
.crwr-card-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.crwr-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.crwr-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.crwr-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prev/Next nav buttons */
.crwr-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a5f;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    z-index: 2;
}

.crwr-card-image:hover .crwr-carousel-nav {
    opacity: 1;
}

.crwr-carousel-nav--prev {
    left: 8px;
}

.crwr-carousel-nav--next {
    right: 8px;
}

.crwr-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.98);
}

/* Dots */
.crwr-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.crwr-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.crwr-carousel-dot--active {
    background: #fff;
    transform: scale(1.25);
}

/* =========================================================
   Badges
   ========================================================= */
.crwr-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    z-index: 3;
    line-height: 1.5;
}

.crwr-badge-featured {
    background-color: #89ddfa;
    color: #1a1a1a;
}

.crwr-badge-under-contract {
    background-color: #f0c040;
    color: #1a1a1a;
}

/* =========================================================
   Card Body
   ========================================================= */
.crwr-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.crwr-card-address {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

.crwr-card-location {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.crwr-card-price {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}

.crwr-price-call {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
}

/* Stats row */
.crwr-card-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    margin-bottom: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #6b7280;
}

.crwr-stat strong {
    color: #374151;
    font-weight: 600;
}

.crwr-stat-sep {
    color: #d1d5db;
    font-size: 12px;
}

/* Footer row */
.crwr-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 4px;
}

.crwr-card-type {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.crwr-card-details-link {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s ease;
}

.crwr-card-details-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* =========================================================
   List View
   ========================================================= */
.crwr-listings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* List Card — horizontal layout */
.crwr-list-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.crwr-list-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Image column */
.crwr-list-card-image {
    width: 320px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.crwr-list-card-image .crwr-card-carousel,
.crwr-list-card-image .crwr-card-no-photo {
    width: 100%;
    height: 100%;
    min-height: 220px;
}

.crwr-list-card-image .crwr-card-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Body column */
.crwr-list-card-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; /* prevents flex overflow */
}

/* Header row: address + price */
.crwr-list-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.crwr-list-card-address {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.crwr-list-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Description */
.crwr-list-card-desc {
    margin: 0 0 14px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* Footer row: stats + badge + link */
.crwr-list-card-readmore {
    color: #1e3a5f;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.crwr-list-card-readmore:hover {
    text-decoration: underline;
}

.crwr-list-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.crwr-list-card-stats {
    font-size: 13px;
    color: #6b7280;
}

.crwr-list-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Status badges */
.crwr-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.5;
}

.crwr-status-badge--active {
    background: #dcfce7;
    color: #166534;
}

.crwr-status-badge--under_contract {
    background: #fef3c7;
    color: #92400e;
}

.crwr-status-badge--sold {
    background: #f3f4f6;
    color: #6b7280;
}

.crwr-status-badge--pending {
    background: #ede9fe;
    color: #6d28d9;
}

/* Responsive list view: stack on mobile */
@media (max-width: 640px) {
    .crwr-list-card {
        flex-direction: column;
    }

    .crwr-list-card-image {
        width: 100%;
        min-height: 200px;
    }

    .crwr-list-card-image .crwr-card-carousel,
    .crwr-list-card-image .crwr-card-no-photo {
        min-height: 200px;
    }

    .crwr-list-card-header {
        flex-direction: column;
        gap: 4px;
    }

    .crwr-list-card-price {
        font-size: 20px;
    }
}

/* =========================================================
   Map View
   ========================================================= */
.crwr-listings-map {
    width: 100%;
    min-height: 500px;
    background: #f3f4f6;
}

.crwr-map-view {
    display: flex;
    flex-direction: row;
    min-height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

/* Sidebar */
.crwr-map-sidebar {
    width: 350px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e5e7eb;
}

/* Map canvas */
.crwr-map-canvas {
    flex: 1;
    min-height: 400px;
}

/* Map card (compact) */
.crwr-map-card {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    align-items: flex-start;
}

.crwr-map-card:hover {
    background: #f8fafc;
}

.crwr-map-card--active {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
    padding-left: 9px; /* compensate for border */
}

/* Thumbnail */
.crwr-map-card-thumb {
    width: 72px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: block;
}

.crwr-map-card-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
}

/* Card info text */
.crwr-map-card-info {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crwr-map-card-street {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crwr-map-card-city {
    font-size: 11px;
    color: #9ca3af;
    display: block;
}

.crwr-map-card-price {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    display: block;
}

.crwr-map-card-stats {
    font-size: 11px;
    color: #6b7280;
    display: block;
}

.crwr-map-card-no-coords {
    font-size: 10px;
    color: #d1d5db;
    font-style: italic;
    display: block;
}

/* Google Maps info window */
.crwr-info-window {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    min-width: 160px;
}

.crwr-info-window strong {
    display: block;
    font-size: 14px;
    color: #111827;
    margin-bottom: 2px;
}

.crwr-info-price {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 14px;
}

.crwr-info-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.crwr-info-link:hover {
    text-decoration: underline;
}

/* Responsive map: full-width map on top, sidebar below on mobile */
@media (max-width: 768px) {
    .crwr-map-view {
        flex-direction: column-reverse; /* map on top, sidebar below */
        min-height: auto;
    }

    .crwr-map-sidebar {
        width: 100%;
        max-height: 320px;
        border-right: none;
        border-top: 1px solid #e5e7eb;
    }

    .crwr-map-canvas {
        min-height: 300px;
        height: 300px;
    }
}

/* =========================================================
   Responsive — Controls
   ========================================================= */
@media (max-width: 600px) {
    .crwr-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .crwr-controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .crwr-sort-select {
        flex: 1;
        min-width: 0;
    }
}

/* =========================================================
   Sold Section
   ========================================================= */
.crwr-sold-section {
    background: transparent;
    border-top: 4px solid #2c3e50;
    padding: 40px 24px;
}

.crwr-sold-header {
    text-align: center;
    margin-bottom: 32px;
}

.crwr-sold-header h2 {
    color: #111827;
    font-size: 24px;
    margin: 0;
}

.crwr-sold-header p {
    color: #6b7280;
    margin: 4px 0 0;
    font-size: 14px;
}

/* Agent strip on cards */
.crwr-card-brokerage {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.crwr-card-brokerage-line {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.crwr-card-brokerage-line:first-child {
    font-weight: 600;
    color: #374151;
}

/* Sold carousel */
.crwr-sold-carousel-wrap {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.crwr-sold-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.crwr-sold-carousel-track::-webkit-scrollbar {
    display: none;
}

.crwr-sold-card {
    flex: 0 0 calc(25% - 15px);
    scroll-snap-align: start;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.crwr-sold-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2c3e50;
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.crwr-sold-carousel-nav:hover {
    background: #1a252f;
}

.crwr-sold-carousel-prev {
    left: 0;
}

.crwr-sold-carousel-next {
    right: 0;
}

.crwr-sold-carousel-nav[disabled] {
    opacity: 0.3;
    cursor: default;
}

.crwr-sold-card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.crwr-sold-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crwr-badge-sold {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #424242;
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.crwr-sold-card-body {
    padding: 16px;
}

.crwr-sold-card-body h3 {
    margin: 0 0 2px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

.crwr-sold-card-location {
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.crwr-sold-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 12px;
}

.crwr-sold-card-stats {
    display: flex;
    gap: 16px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

/* Responsive — Sold Carousel */
@media (max-width: 1100px) {
    .crwr-sold-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .crwr-sold-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .crwr-sold-card {
        flex: 0 0 100%;
    }
    .crwr-sold-carousel-wrap {
        padding: 0 32px;
    }
}

/* =========================================================
   Lightbox
   ========================================================= */
.crwr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crwr-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.crwr-lightbox-image-wrap {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crwr-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.crwr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.crwr-lightbox-close:hover {
    opacity: 1;
}

.crwr-lightbox-prev,
.crwr-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.crwr-lightbox-prev:hover,
.crwr-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.crwr-lightbox-prev {
    left: 20px;
}

.crwr-lightbox-next {
    right: 20px;
}

.crwr-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}
