/* XtremeRealEstate — Modern Minimalist Frontend */
.xre-listings {
    max-width: 1400px;
    margin: 10px auto 40px;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.xre-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid #c9a96e;
    padding-bottom: 8px;
}
.xre-listings-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}
.xre-count {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

/* ── Grid layout ── */
.xre-listings > .xre-header ~ .xre-property {
    display: inline-block;
}
.xre-grid-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Property Card ── */
.xre-property {
    position: relative;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.xre-property:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Number badge */
.xre-number {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    width: 36px;
    height: 36px;
    background: #c9a96e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Slider wrapper */
.xre-slider-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}
/* ── Image Slider (CSS scroll-snap) ── */
.xre-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.xre-slider-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.xre-slider-track::-webkit-scrollbar {
    display: none;
}
.xre-slide {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    flex-shrink: 0;
}
.xre-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.xre-slider {
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    overflow: hidden;
}
.xre-slider:active {
    cursor: grabbing;
}
.xre-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 2;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.xre-slider-btn:hover {
    background: #fff;
}
.xre-slider-prev { left: 8px; }
.xre-slider-next { right: 8px; }
.xre-slider-btn:hover {
    background: rgba(0,0,0,0.7);
}
.xre-slider-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
}
.xre-slide-map {
    background: #e8e8e8;
}
.xre-slide-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}
.xre-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #c9a96e;
}
.xre-badge-sold { background: #e74c3c; }
.xre-badge-pending { background: #f39c12; }

/* ── Body ── */
.xre-body {
    padding: 14px 18px 14px;
}

/* Price row */
.xre-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}
.xre-price {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}
.xre-tags-right {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.xre-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.xre-tag-yes {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.xre-tag-no {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ffccbc;
}

/* Address */
.xre-address {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 2px;
    color: #333;
}
.xre-location {
    font-size: 12px;
    color: #aaa;
    margin: 0 0 12px;
    font-weight: 400;
}

/* Stats row */
.xre-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}
.xre-stat-item {
    flex: 1 1 auto;
    min-width: 60px;
    text-align: center;
    padding: 10px 6px;
    border-right: 1px solid #f0f0f0;
}
.xre-stat-item:last-child { border-right: none; }
.xre-stat-val {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.xre-stat-label {
    display: block;
    font-size: 9px;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    font-weight: 400;
}

/* Description expandable */
.xre-desc-wrap {
    margin-bottom: 10px;
}
.xre-desc-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    transition: max-height 0.3s;
}
.xre-desc-text.xre-collapsed {
    max-height: 3.2em;
    overflow: hidden;
    position: relative;
}
.xre-desc-text.xre-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.6em;
    background: linear-gradient(transparent, #fff);
}
.xre-desc-toggle {
    background: none;
    border: none;
    color: #c9a96e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.xre-desc-toggle:hover { color: #a88640; }

/* Action buttons */
.xre-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.xre-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.xre-btn-outline {
    background: transparent;
    border: 1.5px solid #ddd;
    color: #555;
}
.xre-btn-outline:hover {
    border-color: #c9a96e;
    color: #c9a96e;
}
.xre-btn-gold {
    background: linear-gradient(135deg, #c9a96e, #b8943f);
    color: #fff;
    box-shadow: 0 2px 8px rgba(201,169,110,0.3);
}
.xre-btn-gold:hover {
    background: linear-gradient(135deg, #b8943f, #a07d2e);
    box-shadow: 0 4px 12px rgba(201,169,110,0.4);
    transform: translateY(-1px);
}
.xre-btn-gold.xre-btn-done {
    background: #2e7d32;
    box-shadow: none;
    pointer-events: none;
}
.xre-btn-like {
    background: linear-gradient(135deg, #27ae60, #219150);
    color: #fff;
    box-shadow: 0 2px 8px rgba(39,174,96,0.25);
    gap: 8px;
}
.xre-btn-like:hover {
    background: linear-gradient(135deg, #219150, #1a7a42);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.35);
}
.xre-btn-like.liked {
    background: #219150;
    pointer-events: none;
}
.xre-heart { font-size: 15px; }
.xre-btn-full {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px;
    font-size: 14px;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.xre-btn-dislike {
    background: #fff;
    color: #e74c3c;
    border: 1.5px solid #e74c3c;
}
.xre-btn-dislike:hover {
    background: #e74c3c;
    color: #fff;
}
.xre-btn-dislike.disliked {
    background: #e74c3c;
    color: #fff;
    pointer-events: none;
}

/* Like expanded form */
.xre-like-form {
    margin-top: 8px;
    margin-bottom: 8px;
}
.xre-like-inner {
    background: #f0faf0;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.xre-like-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.xre-like-close:hover {
    color: #e74c3c;
}
.xre-like-inner {
    position: relative;
}
.xre-like-prompt {
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
    margin: 0;
}
.xre-like-datetime {
    display: flex;
    gap: 8px;
}
.xre-like-datetime input {
    flex: 1;
}
.xre-like-date,
.xre-like-time,
.xre-like-note {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}
.xre-like-date:focus,
.xre-like-time:focus,
.xre-like-note:focus {
    outline: none;
    border-color: #27ae60;
}
.xre-btn-subtle {
    background: #f5f5f5;
    color: #666;
}
.xre-btn-subtle:hover {
    background: #eee;
    color: #333;
}
.xre-actions .xre-btn-redfin {
    background: none;
    border: none;
    color: #aaa;
    padding: 0;
    flex: 0 0 auto;
    min-width: 0;
    width: 28px;
}
.xre-actions .xre-btn-redfin:hover {
    color: #d13239;
}
/* Ensure buttons fit in 1 row */
.xre-actions {
    flex-wrap: nowrap;
    gap: 6px;
}
.xre-actions .xre-btn {
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    padding: 8px 0;
    font-size: 12px;
}

/* Feedback form */
.xre-feedback-form {
    margin-top: 12px;
}
.xre-fb-inner {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.xre-fb-name,
.xre-fb-message {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.xre-fb-name:focus,
.xre-fb-message:focus {
    outline: none;
    border-color: #c9a96e;
}
.xre-fb-stars {
    display: flex;
    gap: 4px;
}
.xre-star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
}
.xre-star.active,
.xre-star:hover {
    color: #c9a96e;
}

/* Feedback list */
.xre-feedback-list-wrap {
    margin-top: 8px;
}
.xre-fb-list-toggle {
    background: none;
    border: none;
    color: #c9a96e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.xre-fb-list-toggle:hover { color: #a88640; }
.xre-feedback-list {
    margin-top: 10px;
}
.xre-fb-item {
    background: #fafafa;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-left: 3px solid #c9a96e;
}
.xre-fb-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 4px;
}
.xre-fb-date { color: #aaa; }
.xre-fb-rating { color: #c9a96e; letter-spacing: 1px; }
.xre-fb-msg {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Actions compact in cards */

/* ── Sticky Agent Footer ── */
.xre-sticky-agent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
    padding: 10px 20px;
}
.xre-sticky-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.xre-sticky-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a1a2e;
}
.xre-sticky-profile:hover {
    color: #c9a96e;
}
.xre-sticky-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c9a96e;
}
.xre-sticky-name {
    font-weight: 700;
    font-size: 15px;
}
.xre-sticky-actions {
    display: flex;
    gap: 10px;
}
.xre-sticky-btn {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    color: #fff;
}
.xre-sticky-whatsapp {
    background: #25d366;
}
.xre-sticky-whatsapp:hover {
    background: #1da851;
}
.xre-sticky-phone {
    background: #3478f6;
}
.xre-sticky-phone:hover {
    background: #2560d4;
}
.xre-sticky-email {
    background: #3478f6;
}
.xre-sticky-email:hover {
    background: #2560d4;
}

/* Add bottom padding to page so content isn't hidden behind sticky bar */
.xre-listings {
    padding-bottom: 80px;
}

/* ── Responsive ── */
@media (min-width: 1024px) {
    .xre-grid-wrap {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 769px) and (max-width: 1023px) {
    .xre-grid-wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .xre-grid-wrap {
        grid-template-columns: 1fr;
    }
    .xre-slider-wrap {
        height: 250px;
    }
    .xre-actions {
        flex-wrap: wrap;
    }
    .xre-actions .xre-btn {
        flex: 1 1 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
    }
    .xre-actions .xre-btn-redfin {
        flex: 0 0 auto;
        width: auto;
        padding: 8px 12px;
        font-size: 12px;
    }
}
