/* STI MLS – Frontend Styles */

/* ── Reset & Variables ──────────────────────────────────────────────────── */
.sti-search-widget,
.sti-listings-grid,
.sti-featured-section,
.sti-property-detail {
    --sti-primary:    #1a3c5e;
    --sti-accent:     #d4a843;
    --sti-bg:         #f8f7f5;
    --sti-card-bg:    #ffffff;
    --sti-border:     #e2ddd8;
    --sti-text:       #1c1c1c;
    --sti-muted:      #6b7280;
    --sti-radius:     10px;
    --sti-shadow:     0 2px 12px rgba(0,0,0,0.08);
    --sti-shadow-hover: 0 8px 28px rgba(0,0,0,0.14);
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ── Search Form ────────────────────────────────────────────────────────── */
.sti-search-form {
    background: var(--sti-primary);
    border-radius: var(--sti-radius);
    padding: 24px 28px;
    margin-bottom: 28px;
}
.sti-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}
.sti-field { display: flex; flex-direction: column; flex: 1 1 180px; }
.sti-field--sm { flex: 0 1 130px; }
.sti-field--xs { flex: 0 1 90px; }
.sti-field--btn { flex: 0 0 auto; }
.sti-field label {
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.sti-input, .sti-select {
    padding: 10px 14px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.sti-input::placeholder { color: rgba(255,255,255,0.5); }
.sti-input:focus, .sti-select:focus { border-color: var(--sti-accent); }
.sti-select option { background: var(--sti-primary); color: #fff; }
.sti-btn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: var(--sti-accent);
    color: var(--sti-primary);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
.sti-btn-search:hover { background: #e6bc5a; transform: translateY(-1px); }

/* ── Results header ─────────────────────────────────────────────────────── */
.sti-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
    font-family: 'Arial', sans-serif;
}
#sti-results-count { color: var(--sti-muted); font-size: 14px; }
.sti-select-sm {
    padding: 6px 12px;
    border: 1.5px solid var(--sti-border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: var(--sti-text);
    cursor: pointer;
}

/* ── Listings Grid ──────────────────────────────────────────────────────── */
.sti-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
@media (max-width: 680px) { .sti-listings-grid { grid-template-columns: 1fr; } }

/* ── Property Card ──────────────────────────────────────────────────────── */
.sti-card {
    background: var(--sti-card-bg);
    border-radius: var(--sti-radius);
    box-shadow: var(--sti-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--sti-text);
}
.sti-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sti-shadow-hover);
}
.sti-card-img {
    position: relative;
    overflow: hidden;
    height: 210px;
    background: #e5e0d8;
}
.sti-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.sti-card:hover .sti-card-img img { transform: scale(1.04); }
.sti-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--sti-primary);
    color: #fff;
    font-size: 11px;
    font-family: 'Arial', sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}
.sti-card-badge--featured {
    background: var(--sti-accent);
    color: var(--sti-primary);
    right: 12px;
    left: auto;
}
.sti-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.sti-card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--sti-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.sti-card-address {
    font-size: 13px;
    color: var(--sti-muted);
    font-family: 'Arial', sans-serif;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sti-card-stats {
    display: flex;
    gap: 16px;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    color: var(--sti-text);
    border-top: 1px solid var(--sti-border);
    padding-top: 14px;
    margin-top: auto;
}
.sti-card-stat { display: flex; align-items: center; gap: 5px; }
.sti-card-type {
    font-size: 11px;
    color: var(--sti-muted);
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

/* ── Loading ────────────────────────────────────────────────────────────── */
.sti-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px;
    color: var(--sti-muted);
    font-family: 'Arial', sans-serif;
}
.sti-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--sti-border);
    border-top-color: var(--sti-primary);
    border-radius: 50%;
    animation: sti-spin 0.7s linear infinite;
    margin-bottom: 12px;
}
@keyframes sti-spin { to { transform: rotate(360deg); } }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.sti-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    font-family: 'Arial', sans-serif;
}
.sti-page-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--sti-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: var(--sti-text);
    transition: all 0.2s;
}
.sti-page-btn:hover, .sti-page-btn.active {
    background: var(--sti-primary);
    color: #fff;
    border-color: var(--sti-primary);
}

/* ── Section Title ──────────────────────────────────────────────────────── */
.sti-section-title {
    font-size: 28px;
    color: var(--sti-primary);
    margin-bottom: 24px;
    border-left: 4px solid var(--sti-accent);
    padding-left: 14px;
}

/* ── Property Detail Page ───────────────────────────────────────────────── */
.sti-property-detail { max-width: 900px; margin: 0 auto; }
.sti-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    border-radius: var(--sti-radius);
    overflow: hidden;
    height: 420px;
    margin-bottom: 28px;
}
.sti-gallery img { width: 100%; height: 100%; object-fit: cover; }
.sti-gallery img:first-child { grid-row: span 2; }
.sti-price-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.sti-price { font-size: 36px; font-weight: 700; color: var(--sti-primary); }
.sti-status {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 20px;
}
.sti-status--active { background: #dcfce7; color: #166534; }
.sti-status--inactive { background: #fee2e2; color: #991b1b; }
.sti-stats-row {
    display: flex;
    gap: 24px;
    font-size: 15px;
    font-family: 'Arial', sans-serif;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sti-border);
}
.sti-features ul { columns: 2; list-style: disc; padding-left: 20px; font-family: 'Arial', sans-serif; }
.sti-map { height: 340px; border-radius: var(--sti-radius); overflow: hidden; margin-top: 28px; background: #e5e0d8; }

/* ── No results ─────────────────────────────────────────────────────────── */
.sti-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: 'Arial', sans-serif;
    color: var(--sti-muted);
}
.sti-no-results h3 { font-size: 22px; margin-bottom: 8px; color: var(--sti-primary); }
