/* =========================================================
   InmoPanama - Homepage
   Estilos exclusivos de index.php
   ========================================================= */

/* ============================================
   FONDOS ESTÁTICOS DE SECCIÓN
   Extraídos de atributos style="" inline (Sept 2026)
   ============================================ */

/* Sección "Propiedades destacadas" */
.ib-home-featured-bg {
    background-image: url(/assets-new/img/all-images/bg/bg1.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Sección "Propiedades rebajadas" (items-section-area) */
.ib-home-deals-bg {
    background-image: url(/assets-new/img/all-images/bg/bg2.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* Sección CTA final */
.ib-home-cta-bg {
    background-image: url(/assets-new/img/all-images/bg/cta-bg2.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ============================================
   SLIDER ÚLTIMOS PROYECTOS — .ib-hd-card
   Extraído de <style> inline en index.php (Sept 2026)
   ============================================ */

.ib-hd-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaecef;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ib-hd-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.10); transform: translateY(-2px); text-decoration: none; }
.ib-hd-card__image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e0d0, #c9a961);
}
.ib-hd-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Corazón: top calculado (mismo patrón que sim-card / property list) — Sept 2026 */
.ib-hd-card__image .ib-fav-btn { top: calc(180px - 44px); bottom: auto; right: 10px; left: auto; }
.ib-hd-card__no-image { width: 100%; height: 100%; }
.ib-hd-card__body { padding: 14px 16px 16px; }
.ib-hd-card__type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: #888; margin: 0 0 4px; }
.ib-hd-card__name {
    font-size: 15px; font-weight: 700; color: #1a1a1a; margin: 0 0 4px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ib-hd-card:hover .ib-hd-card__name { color: var(--ib-amarillo, #F5B91C); }
.ib-hd-card__location { font-size: 12px; color: #888; margin: 0 0 10px; }
/* Precio en negro de marca — nunca amarillo sobre blanco (Sept 2026) */
.ib-hd-card__price { font-size: 16px; font-weight: 700; color: #0B0B0B; margin: 0 0 4px; letter-spacing: -.02em; }
.ib-hd-card__price-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #888; display: block; margin-bottom: 2px; }
.ib-hd-card__m2 { font-size: 12px; color: #666; margin: 0; }

/* ============================================
   PROPIEDADES REBAJADAS — panel + swiper
   Extraído de <style> inline en index.php (Sept 2026)
   ============================================ */
/* ============================================
   Panel Rebajadas — Diseño visual refinado — Cut Home-Rebajadas-Visual
   Namespace: .rebajadas-panel — aislado del CSS de otros sliders.
   Selectores usan clases reales del HTML inline (no partial).
   ============================================ */

/* --- Panel contenedor --- */
/* Estado vacío: panel blanco visible */
.rebajadas-panel--empty {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.rebajadas-panel--empty .rp-empty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ib-amarillo, #F5B91C);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}
.rebajadas-panel--empty h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0;
}

/* Panel con cards: compacto (1 card) — transparente, la sombra la da la card */
.rebajadas-panel--compact {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 340px;
    margin-left: auto; /* pega el panel a la derecha del col-lg-8 */
}

/* Panel con múltiples cards: fondo blanco contenedor */
.rebajadas-panel:not(.rebajadas-panel--compact):not(.rebajadas-panel--empty) {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Grid layouts */
.rebajadas-panel__grid--single { display: block; }
.rebajadas-panel__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* ================================================================
   CARD (.property-boxarea) — estilos comunes a single Y grid
   Todos bajo .rebajadas-panel para no afectar otros contextos.
   ================================================================ */

/* Card base: sombra y bordes redondeados */
.rebajadas-panel .property-boxarea {
    background: #fff;
    border-radius: 12px;
    border: none;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    max-height: none;
}
.rebajadas-panel .property-boxarea:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.24);
}

/* Imagen — position:relative necesario (falta el ancestro .property-feature-slider) */
.rebajadas-panel .property-boxarea .img1 {
    position: relative !important;
    overflow: hidden;
    height: 220px !important; /* prominente en single */
    max-height: 220px !important;
}
.rebajadas-panel__grid .property-boxarea .img1 {
    height: 150px !important; /* más compacta en grid múltiple */
    max-height: 150px !important;
}
.rebajadas-panel .property-boxarea .img1 img {
    height: 100% !important;
    width: 100%;
    object-fit: cover;
    display: block;
    max-width: none !important; /* pisa la regla global img { max-width:100% } */
    max-height: none !important;
}

/* Badge -X% — rojo prominente en esquina superior izquierda */
.rebajadas-panel .ib-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 6px;
    z-index: 4;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(220,38,38,0.4);
}

/* Badge de tipo de propiedad — OCULTO en el panel */
.rebajadas-panel .ib-type-badge {
    display: none !important;
}

/* Badge "En Venta" / "En Alquiler" — amarillo con texto oscuro */
.rebajadas-panel .property-boxarea .category-list {
    padding: 10px 16px 0;
}
.rebajadas-panel .property-boxarea .category-list ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.rebajadas-panel .property-boxarea .category-list ul li a {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a !important;
    background: var(--ib-amarillo, #F5B91C);
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Área de contenido */
.rebajadas-panel .property-boxarea .content-area {
    padding: 12px 16px 16px;
}

/* Título — negro, negrita, truncado a 2 líneas */
.rebajadas-panel .property-boxarea .content-area > a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.rebajadas-panel__grid .property-boxarea .content-area > a {
    font-size: 13px; /* más pequeño en grid múltiple */
}
.rebajadas-panel .property-boxarea .content-area > a:hover {
    color: var(--ib-amarillo, #F5B91C) !important;
}

/* Zona — gris */
.rebajadas-panel .property-boxarea .content-area p {
    color: #6b7280 !important;
    font-size: 13px;
    font-weight: 500;
    margin: 4px 0 12px;
}

/* Bloque de precios — separador superior */
.rebajadas-panel .property-boxarea .btn-area {
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    margin-top: 0;
}
.rebajadas-panel .ib-rebaja-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

/* Precio anterior — gris tachado */
.rebajadas-panel .ib-rebaja-old {
    text-decoration: line-through !important;
    color: #9ca3af !important;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.rebajadas-panel__grid .ib-rebaja-old {
    font-size: 11px;
}

/* Precio actual — negro de marca (legible sobre fondo blanco — Sept 2026) */
.rebajadas-panel .nm-btn {
    color: #0B0B0B !important;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    text-decoration: none !important;
    background: none;
    padding: 0;
    border: none;
}
.rebajadas-panel__grid .nm-btn {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 991px) {
    .rebajadas-panel--compact { max-width: 100%; }
    .rebajadas-panel__grid { grid-template-columns: 1fr; }
    .rebajadas-panel .property-boxarea .img1 { height: 200px !important; max-height: 200px !important; }
}
@media (max-width: 640px) {
    .rebajadas-panel .property-boxarea .img1 { height: 180px !important; max-height: 180px !important; }
    .rebajadas-panel .property-boxarea .content-area > a { font-size: 14px; }
    .rebajadas-panel .nm-btn { font-size: 18px; }
}

/* --- Carrusel vertical rebajadas (≥ 4 cards / Swiper activo) --- */
.rebajadas-slide-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    align-content: start;
}
/* Cards dentro del swiper: imagen compacta igual que en el grid múltiple */
.rebajadas-swiper .property-boxarea .img1       { height: 150px !important; max-height: 150px !important; }
.rebajadas-swiper .property-boxarea .content-area > a { font-size: 13px; }
.rebajadas-swiper .nm-btn                       { font-size: 16px; }
.rebajadas-swiper .ib-rebaja-old                { font-size: 11px; }

/* Desktop: Swiper vertical — 1 fila de 2 cards visible a la vez */
@media (min-width: 992px) {
    .rebajadas-swiper {
        height: 330px; /* 1 slide × ~314px card + margen */
        overflow: hidden;
        border-radius: 8px;
    }
}
/* Móvil: Swiper horizontal activo — height auto, Swiper gestiona el layout */

/* --- Flechas prev/next del carrusel rebajadas --- */
.reb-swiper-prev,
.reb-swiper-next {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F5B91C;
    color: #0B0B0B;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
    transition: background .15s;
}
.reb-swiper-prev:hover,
.reb-swiper-next:hover { background: #e0a900; }
.reb-swiper-prev.swiper-button-disabled,
.reb-swiper-next.swiper-button-disabled { opacity: .4; pointer-events: none; }
/* Desktop (vertical): botones en esquinas superiores e inferiores al lado derecho */
@media (min-width: 992px) {
    .reb-swiper-prev { top: 8px; right: 8px; }
    .reb-swiper-next { bottom: 8px; right: 8px; }
    /* Rotar chevron ‹ → ↑  y  › → ↓  para el eje vertical */
    .reb-swiper-prev svg { transform: rotate(-90deg); }
    .reb-swiper-next svg { transform: rotate(90deg); }
}
/* Móvil (horizontal): botones centrados a izquierda y derecha */
@media (max-width: 991px) {
    .reb-swiper-prev { left: 8px; top: 50%; transform: translateY(-50%); }
    .reb-swiper-next { right: 8px; top: 50%; transform: translateY(-50%); }
}
/* B1/B2: Botón favorito en rebajadas — esquina inferior derecha (Sept 2026) */
.rebajadas-panel .img1 .ib-fav-btn { top: auto; bottom: 10px; }
