/* =====================================================
   Property Search Addon — Estilos
   Widget 1: Buscador (.psf-*)
   Widget 2: Resultados (.psr-*)
   ===================================================== */

/* ═══════════════════════════════════════════
   WIDGET 1 — BUSCADOR
═══════════════════════════════════════════ */

.psf-wrapper { width: 100%; }

/* ── Tabs ── */
.psf-tabs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.psf-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: 8px 8px 0 0;
    background: #f0f0f0;
    color: #666;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    white-space: nowrap;
}

.psf-tab.active {
    background: #1a237e;
    color: #fff;
}
.psf-tab:hover {
    background: #1a237e;
    color: #fff;
}

/* ── Fila de formulario ── */
.psf-form-row {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    min-height: 72px;
}

/* ── Campo (dropdown) ── */
.psf-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 20px;
    flex: 1;
    min-width: 0;
    position: relative;
}

.psf-field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 4px;
    line-height: 1;
}

.psf-select {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 20px;
    line-height: 1.3;
}

.psf-select-arrow {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 12px;
    color: #aaa;
    pointer-events: none;
}

/* ── Divisor entre campos ── */
.psf-field-divider {
    width: 1px;
    background: #e0e0e0;
    align-self: stretch;
    margin: 14px 0;
    flex-shrink: 0;
}

/* ── Botón de búsqueda ── */
.psf-btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: #00bcd4;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    border-radius: 0 10px 10px 0;
    min-width: 120px;
    flex-shrink: 0;
}

.psf-btn-search:hover {
    background: #0097a7;
    transform: translateX(1px);
}

.psf-btn-icon-before { display: flex; align-items: center; }
.psf-btn-icon-after  { display: flex; align-items: center; }
.psf-btn-search i,
.psf-btn-search svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive buscador */
@media (max-width: 640px) {
    .psf-form-row {
        flex-direction: column;
        border-radius: 0 0 12px 12px;
    }
    .psf-field-divider { width: 100%; height: 1px; margin: 0 14px; align-self: auto; }
    .psf-btn-search { border-radius: 0 0 10px 10px; width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════
   WIDGET 2 — RESULTADOS
   (Clases psr-* — idéntico al Property Loop)
═══════════════════════════════════════════ */

.psr-wrapper { width: 100%; }

/* ── Contador ── */
.psr-results-count {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}
.psr-count-number  { font-weight: 700; color: #1a1a2e; font-size: 1.1em; }
.psr-count-filters { color: #888; font-style: italic; margin-left: 4px; }

/* ── Grid ── */
.psr-grid {
    display: grid;
    gap: 24px;
}
.psr-cols-1 { grid-template-columns: 1fr; }
.psr-cols-2 { grid-template-columns: repeat(2, 1fr); }
.psr-cols-3 { grid-template-columns: repeat(3, 1fr); }
.psr-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .psr-cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .psr-cols-3, .psr-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .psr-cols-2, .psr-cols-3, .psr-cols-4 { grid-template-columns: 1fr; } }

/* ── Sin resultados ── */
.psr-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.psr-no-results-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.psr-no-results p    { font-size: 16px; margin: 0; }

/* ── Tarjeta — idéntico a .pla-card ── */
.psr-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.psr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* ── Imagen ── */
.psr-card-image { overflow: hidden; }
.psr-card-image a { display: block; }
.psr-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.psr-card:hover .psr-card-image img { transform: scale(1.04); }

/* ── Elementos directos en la tarjeta (sin body wrapper) ── */
.psr-card > .psr-card-title,
.psr-card > .psr-card-price,
.psr-card > .psr-location,
.psr-card > .psr-features {
    padding-left: 20px;
    padding-right: 20px;
}
.psr-card > .psr-card-title  { padding-top: 16px; }
.psr-card > .psr-features    { margin-left: 20px; margin-right: 20px; margin-bottom: 12px; }
.psr-card > .psr-card-button { padding-bottom: 20px; margin-top: auto; padding-left: 20px; padding-right: 20px; }

/* ── Body wrapper (cuando se usa) ── */
.psr-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Título ── */
.psr-card-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a2e;
}
.psr-card-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.psr-card-title a:hover { color: #e84393; }

/* ── Precio ── */
.psr-card-price {
    margin: 0 0 10px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.psr-price-amount { font-size: 1.25rem; font-weight: 800; color: #e84393; }
.psr-price-suffix { font-size: 0.8rem; font-weight: 600; color: #888; letter-spacing: 0.04em; }

/* ── Ubicación ── */
.psr-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: #666;
}
.psr-location-icon {
    color: #e84393;
    flex-shrink: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.psr-location-icon svg  { width: 14px; height: 14px; fill: #e84393; }
.psr-location-icon-img  { flex-shrink: 0; display: flex; align-items: center; }
.psr-location-icon-img img { width: 14px; height: 14px; object-fit: contain; }
.psr-location-text      { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Características ── */
.psr-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0 0 16px;
}
.psr-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 50px;
    flex: 1;
    text-align: center;
}
.psr-feature-icon { font-size: 16px; color: #e84393; line-height: 1; display: flex; align-items: center; justify-content: center; }
.psr-feature-icon svg { width: 16px; height: 16px; fill: #e84393; }
.psr-feature-icon-img { display: flex; align-items: center; justify-content: center; }
.psr-feature-icon-img img { width: 16px; height: 16px; object-fit: contain; }
.psr-feature-value { font-size: 0.9rem; font-weight: 700; color: #333; line-height: 1.2; }
.psr-feature-label { font-size: 0.7rem; color: #888; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.03em; }

/* ── Botón ── */
.psr-card-button { margin-top: auto; }
.psr-btn {
    display: inline-block;
    background: #e84393;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    line-height: 1.4;
}
.psr-btn-full { display: block; width: 100%; }
.psr-btn:hover { background: #c0336c; color: #fff; transform: translateY(-1px); text-decoration: none; }

/* ── Paginación numérica ── */
.psr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 36px;
}
.psr-pagination a,
.psr-pagination .current,
.psr-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    background: #f0f0f0;
    color: #333;
    transition: all 0.2s;
}
.psr-pagination a:hover { background: #e84393; color: #fff; border-color: #e84393; }
.psr-pagination .current { background: #e84393; color: #fff; border-color: #e84393; }

/* ── Load More ── */
.psr-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}
.psr-load-more {
    background: #e84393;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 40px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.psr-load-more:hover    { background: #c0306e; transform: translateY(-2px); }
.psr-load-more:disabled { background: #ccc; cursor: not-allowed; transform: none; }
