/* ─── Robsy Properties — Frontend Styles ─────────────────────────────────── */

/* ─── LISTING GRID ──────────────────────────────────────────────────────────── */
.robsy-properties-wrap {
    width: 100%;
}
.robsy-properties-grid {
    display: grid;
    gap: 24px;
}
.robsy-cols-4 { grid-template-columns: repeat(4, 1fr); }
.robsy-cols-3 { grid-template-columns: repeat(3, 1fr); }
.robsy-cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1100px) {
    .robsy-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .robsy-cols-4,
    .robsy-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .robsy-cols-4,
    .robsy-cols-3,
    .robsy-cols-2 { grid-template-columns: 1fr; }
}

/* ─── CARD ──────────────────────────────────────────────────────────────────── */
.robsy-property-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}
.robsy-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.robsy-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

/* Imagen con ratio 4:3 */
.robsy-card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 */
    overflow: hidden;
    background: #e8e8e8;
}
.robsy-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.robsy-property-card:hover .robsy-card-img {
    transform: scale(1.04);
}

/* Degradado negro de abajo hacia arriba */
.robsy-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.70) 0%, transparent 55%);
    pointer-events: none;
}

/* Precio (abajo izquierda dentro de imagen) */
.robsy-card-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    z-index: 2;
}

/* Badge tipo propiedad (arriba derecha dentro de imagen) */
.robsy-card-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(240, 244, 255, 0.92);
    color: #333;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 30px;
    z-index: 2;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ─── BODY ──────────────────────────────────────────────────────────────────── */
.robsy-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.robsy-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #777;
    font-size: .82rem;
    margin-bottom: 6px;
}
.robsy-card-location svg {
    flex-shrink: 0;
    color: #e05;
}
.robsy-card-title {
    font-size: .97rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
    line-height: 1.35;
}

/* Features row — pegado al fondo del card body */
.robsy-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: auto;
}
.robsy-feat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: #555;
    font-weight: 500;
}
.robsy-feat svg {
    color: #999;
    flex-shrink: 0;
}

/* ─── PAGINATION ────────────────────────────────────────────────────────────── */
.robsy-properties-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 24px 2px 0;
    padding: 6px 14px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s;
}
.robsy-properties-wrap .page-numbers.current,
.robsy-properties-wrap .page-numbers:hover {
    background: #1a1a2e;
    color: #fff;
}
.robsy-no-results {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ─── SINGLE PROPERTY ──────────────────────────────────────────────────────── */

/* ── Header ── */
.robsy-single-wrap { width: 100%; }
.robsy-single-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.robsy-single-title {
    font-size: 1.7rem;
    margin: 0 0 8px;
    color: #1a1a2e;
    line-height: 1.2;
}
.robsy-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.robsy-single-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a2e;
    white-space: nowrap;
}

/* Badges reutilizables */
.robsy-badge {
    background: #f0f4ff;
    color: #333;
    border: 1px solid #d0daf5;
    border-radius: 30px;
    padding: 4px 12px;
    font-size: .78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.robsy-badge--green  { background: #e6f9ee; border-color: #b5dfc8; color: #1a7a44; }
.robsy-badge--red    { background: #fdecea; border-color: #f5c6c2; color: #c0392b; }
.robsy-badge--orange { background: #fff7e6; border-color: #ffd89e; color: #b06000; }
.robsy-badge--gray   { background: #f3f4f6; border-color: #d1d5db; color: #555; font-size:.75rem; }

/* ── Dos columnas: main + sidebar ── */
.robsy-single-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 1024px) {
    .robsy-single-layout { grid-template-columns: 1fr 300px; gap: 24px; }
}
/* Mobile: una columna, sidebar va al final */
@media (max-width: 768px) {
    .robsy-single-layout {
        grid-template-columns: 1fr;
    }
    .robsy-single-sidebar {
        order: 2;          /* después de .robsy-single-main */
    }
    .robsy-single-main {
        order: 1;
    }
}

/* ── CAROUSEL ── */
.robsy-carousel-wrap {
    position: relative;
    width: 100%;
    max-width: 905px;
    height: 540px;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 12px;
}
.robsy-carousel-track {
    display: flex;
    height: 100%;
    transition: transform .4s ease;
}
.robsy-carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.robsy-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
/* Navigation arrows */
.robsy-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    padding: 12px 18px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
    z-index: 5;
    line-height: 1;
    transition: background .2s;
}
.robsy-carousel-btn:hover { background: rgba(0,0,0,.85); }
.robsy-carousel-btn.prev { left: 12px; }
.robsy-carousel-btn.next { right: 12px; }
.robsy-carousel-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .78rem;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 5;
}

/* Thumbnails */
.robsy-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.robsy-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .65;
    transition: opacity .2s, border-color .2s;
    background: #000;
}
.robsy-thumb.active,
.robsy-thumb:hover { opacity: 1; border-color: #1a1a2e; }

/* ── Meta datos ── */
.robsy-property-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 0 0 24px;
    padding: 20px;
    background: #f8f8fb;
    border-radius: 10px;
}
.robsy-meta-item { display: flex; flex-direction: column; gap: 3px; }
.robsy-meta-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #999; font-weight: 600; }
.robsy-meta-value { font-size: .97rem; color: #1a1a2e; font-weight: 700; }

/* ── Descripción ── */
.robsy-description {
    line-height: 1.75;
    color: #333;
    margin-bottom: 28px;
}

/* ── Sección titles ── */
.robsy-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f5;
}

/* ── Amenidades: 3 columnas con check ── */
.robsy-amenities-section { margin-bottom: 28px; }
.robsy-amenities-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
}
@media (max-width: 640px) {
    .robsy-amenities-checklist { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .robsy-amenities-checklist { grid-template-columns: 1fr; }
}
.robsy-amenity-check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    color: #333;
}
.robsy-check-icon { flex-shrink: 0; }

/* ── Sub-unidades ── */
.robsy-subunits-section { margin-bottom: 28px; }
.robsy-table-scroll { overflow-x: auto; }
.robsy-subunits-table-front {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    min-width: 560px;
}
.robsy-subunits-table-front th,
.robsy-subunits-table-front td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.robsy-subunits-table-front th {
    background: #f6f7f7;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .4px;
}
.robsy-subunits-table-front tr:hover td { background: #fafbff; }

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.robsy-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}

.robsy-sidebar-box {
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.robsy-sidebar-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f5;
}

/* ── Agente ── */
.robsy-agent-box { }
.robsy-agent-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.robsy-agent-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8f0;
}
.robsy-agent-avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #f0f0f5;
    border: 3px solid #e8e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.robsy-agent-details { text-align: center; }
.robsy-agent-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #aaa;
    font-weight: 600;
    margin-bottom: 2px;
}
.robsy-agent-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.robsy-agent-contacts {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
    text-align: left;
}
.robsy-contact-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85rem;
    color: #444;
    text-decoration: none;
    transition: color .15s;
}
.robsy-contact-link:hover { color: #1a1a2e; }
.robsy-contact-link--wa { color: #128c7e; font-weight: 600; }
.robsy-contact-link--wa:hover { color: #075e54; }

/* ── Formulario WhatsApp ── */
.robsy-wa-form-box { }
.robsy-form-field { margin-bottom: 12px; }
.robsy-form-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}
.robsy-req { color: #e05; }
.robsy-form-field input,
.robsy-form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: .88rem;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color .15s;
    font-family: inherit;
}
.robsy-form-field input:focus,
.robsy-form-field textarea:focus {
    outline: none;
    border-color: #25d366;
    background: #fff;
}
.robsy-form-field textarea { resize: vertical; min-height: 70px; }
.robsy-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
}
.robsy-wa-btn:hover { background: #1ebe5d; }
.robsy-form-note { font-size: .78rem; color: #e05; margin-top: 8px; text-align: center; }

/* ── Calculadora ── */
.robsy-calc-form { }
.robsy-calc-submit {
    display: block;
    width: 100%;
    padding: 10px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background .2s;
    font-family: inherit;
}
.robsy-calc-submit:hover { background: #2d2d50; }
.robsy-calc-result {
    margin-top: 16px;
    background: #f8f8fb;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.robsy-calc-row {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    color: #444;
}
.robsy-calc-highlight {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a2e;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8f0;
}
