/* components.css — Standardized components */
/* ALL buttons: font-body, 600 weight, 0.9375rem */
/* ALL inputs:  font-body, 400 weight, 0.9375rem */

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    height: 52px;
    padding: 0 var(--s3);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.06),
        0 2px 8px rgba(0,0,0,0.04);
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 2px 6px rgba(0,0,0,0.10),
        0 8px 20px rgba(0,0,0,0.06);
}
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--obsidian-green); color: white; }
.btn-primary:hover { background: var(--obsidian-hover); color: white; }

.btn-accent    { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); color: white; }

.btn-dark      { background: var(--obsidian); color: white; }
.btn-dark:hover { background: var(--obsidian-light); color: white; }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
    box-shadow: none;
}
.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.btn-whatsapp  { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #1DA851; color: white; }
.btn-danger    { background: var(--error); color: white; }

.btn-sm  { height: 40px; padding: 0 var(--s2); font-size: 0.8125rem; }
.btn-lg  { height: 56px; padding: 0 var(--s4); }
.btn-block { width: 100%; }

/* ─── Forms ─── */
.form-group { margin-bottom: var(--s3); }

.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    height: 52px;
    padding: 0 var(--s2);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--obsidian-green);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(47,79,58,0.10);
}

.form-textarea {
    height: auto;
    min-height: 120px;
    padding: var(--s2);
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 6px;
}

/* ─── Listing Card ─── */
.listing-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.03),
        0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    border: 1px solid var(--border);
}
.listing-card:hover {
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.03),
        0 8px 32px rgba(0,0,0,0.10);
    transform: translateY(-4px);
    border-color: transparent;
}
.listing-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: linear-gradient(135deg, #E8E8E4 0%, #F0F0EC 50%, #E0E0DC 100%);
}
.listing-card-body { padding: var(--s3); }
.listing-card-price {
    font-family: var(--font-mono);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--obsidian);
    letter-spacing: -0.02em;
}
.listing-card-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin: var(--s1) 0 4px;
}
.listing-card-title a { color: var(--text); }
.listing-card-title a:hover { color: var(--accent); }
.listing-card-location {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ─── Badges ─── */
.badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--s1);
}
.badge-land       { background: #F5F0E6; color: #8B7355; }
.badge-house      { background: #EBF3EB; color: #4A7C4A; }
.badge-rancho     { background: #FBF0E5; color: #A0642A; }
.badge-commercial { background: #ECEEF5; color: #555B7A; }
.badge-cabin      { background: #F0EDE8; color: #6B6B5A; }

/* ─── Status ─── */
.status {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}
.status-draft          { background: #F3F3F3; color: #888; }
.status-active         { background: #EBF5EC; color: var(--sage); }
.status-under_contract { background: #FFF8E1; color: #B8860B; }
.status-sold           { background: #E8F5E9; color: #2E7D32; }
.status-archived       { background: #F5F5F5; color: #AAA; }

/* ─── Flash Messages ─── */
.flash {
    padding: var(--s2) var(--s3);
    border-radius: var(--radius);
    margin-bottom: var(--s3);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    animation: flashIn 0.3s ease;
}
.flash-error {
    background: var(--error-bg);
    color: var(--error);
    border: 2px solid rgba(220,53,69,0.15);
}
.flash-success {
    background: var(--success-bg);
    color: var(--sage);
    border: 2px solid rgba(107,143,113,0.15);
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
