/**
 * Centraliza Resales - Estilos Ficha Técnica y Detalle de Inmueble
 * Compatible con WordPress Gutenberg, Full Site Editing (FSE), Classic Themes y Centraliza Builder.
 * Arquitectura Scoped 100% aislada bajo .cz-property-details-container
 * Personalizable mediante CSS Custom Properties (--cz-accent, --cz-price, --cz-radius).
 */

/* ==========================================================================
   RESET & CONTENEDOR PRINCIPAL
   ========================================================================== */
.cz-property-details-container {
    --cz-accent: #2563eb;
    --cz-price: #2563eb;
    --cz-title-color: #0f172a;
    --cz-text-color: #334155;
    --cz-card-bg: #ffffff;
    --cz-card-border: #e2e8f0;
    --cz-border-width: 1px;
    --cz-font-heading: inherit;
    --cz-font-body: inherit;
    --cz-body-font-size: 1rem;
    --cz-badge-bg: #2563eb;
    --cz-badge-text: #ffffff;
    --cz-radius: 14px;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px 60px;
    box-sizing: border-box;
    font-family: var(--cz-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    font-size: var(--cz-body-font-size, 1rem);
    color: var(--cz-text-color, #1e293b);
    line-height: 1.6;
}

.cz-detalles-title,
.cz-section-title,
.cz-contact-card-title,
.cz-modal-title,
.cz-schedule-summary,
.cz-property-details-container h1,
.cz-property-details-container h2,
.cz-property-details-container h3,
.cz-property-details-container h4 {
    font-family: var(--cz-font-heading, inherit);
    color: var(--cz-title-color, #0f172a);
}

.cz-property-details-container *,
.cz-property-details-container *::before,
.cz-property-details-container *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   BARRA SUPERIOR DE NAVEGACIÓN Y TAGS
   ========================================================================== */
.cz-detalles-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.cz-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cz-back-link:hover {
    color: var(--cz-accent, #2563eb);
}

.cz-detalles-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cz-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cz-badge-op {
    background: #eff6ff;
    color: var(--cz-accent, #1d4ed8);
    border: 1px solid #bfdbfe;
}

.cz-badge-op.rent {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cz-badge-type {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cz-badge-ref {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

/* ==========================================================================
   CABECERA PRINCIPAL (TÍTULO, PRECIO Y ACCIONES)
   ========================================================================== */
.cz-detalles-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.cz-detalles-header-info {
    flex: 1 1 500px;
}

.cz-detalles-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cz-title-color, #0f172a);
    line-height: 1.25;
    margin: 0 0 8px 0;
}

.cz-detalles-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 1.05rem;
    font-weight: 500;
}

.cz-detalles-header-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cz-detalles-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cz-detalles-price {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--cz-price, #2563eb);
    line-height: 1;
}

.cz-detalles-price-period {
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
}

.cz-detalles-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cz-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--cz-radius, 12px);
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cz-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--cz-title-color, #0f172a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cz-action-btn svg {
    flex-shrink: 0;
}

.cz-action-btn.cz-fav-btn.is-active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.cz-action-btn.cz-virtual-tour {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.cz-action-btn.cz-virtual-tour:hover {
    background: #0369a1;
}

/* ==========================================================================
   MOSAICO DE FOTOS DE PORTADA (5 IMÁGENES)
   ========================================================================== */
.cz-mosaic-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 230px 230px;
    min-height: 470px;
    gap: 10px;
    border-radius: var(--cz-radius, 16px);
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
    background: #0f172a;
}

.cz-mosaic-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.35s ease;
}

.cz-mosaic-item:hover {
    transform: scale(1.02);
}

.cz-mosaic-item-0 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.cz-mosaic-item-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.cz-mosaic-item-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.cz-mosaic-item-3 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.cz-mosaic-item-4 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.cz-mosaic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.cz-mosaic-item-4:hover .cz-mosaic-overlay {
    background: rgba(15, 23, 42, 0.65);
}

.cz-mosaic-badge-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: #ffffff;
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cz-mosaic-badge-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-1px);
}

/* ==========================================================================
   FRANJA DE MÉTRICAS RÁPIDAS
   ========================================================================== */
.cz-quick-specs-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
}

.cz-spec-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: var(--cz-border-width, 1px) solid var(--cz-card-border, #e2e8f0);
    border-radius: var(--cz-radius, 12px);
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.cz-spec-pill:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.cz-spec-icon {
    width: 38px;
    height: 38px;
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    background: #eff6ff;
    color: var(--cz-accent, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cz-spec-info {
    display: flex;
    flex-direction: column;
}

.cz-spec-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cz-title-color, #0f172a);
    line-height: 1.2;
}

.cz-spec-lbl {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   ESTRUCTURA DE DOS COLUMNAS (CONTENIDO + SIDEBAR STICKY)
   ========================================================================== */
.cz-detalles-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 40px;
    align-items: start;
}

.cz-detalles-content-col {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* Sección Genérica */
.cz-section-card {
    background: var(--cz-card-bg, #ffffff);
    border: var(--cz-border-width, 1px) solid var(--cz-card-border, #e2e8f0);
    border-radius: var(--cz-radius, 16px);
    padding: 28px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
}

.cz-section-title {
    font-family: var(--cz-font-heading, inherit);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--cz-title-color, #0f172a);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--cz-card-border, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cz-property-description-body {
    font-size: var(--cz-body-font-size, 1rem);
    color: var(--cz-text-color, #334155);
    line-height: 1.75;
    font-family: var(--cz-font-body, inherit);
}

.cz-property-description-body p {
    margin: 0 0 16px 0;
}

.cz-property-description-body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   CARACTERÍSTICAS Y EQUIPAMIENTO (CHIPS Y CATEGORÍAS)
   ========================================================================== */
.cz-features-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cz-feature-cat-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cz-feature-cat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cz-feature-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cz-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: var(--cz-border-width, 1px) solid var(--cz-card-border, #e2e8f0);
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    padding: 7px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cz-text-color, #1e293b);
    transition: all 0.15s ease;
}

.cz-feature-chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.cz-feature-chip svg {
    color: var(--cz-accent, #2563eb);
    flex-shrink: 0;
}

/* Certificado Energético */
.cz-energy-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.cz-energy-box img {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    border: 1px solid #e2e8f0;
}

/* Mapa Leaflet */
.cz-map-wrapper {
    height: 360px;
    width: 100%;
    border-radius: var(--cz-radius, 12px);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    z-index: 1;
}

/* ==========================================================================
   BARRA LATERAL / CARD DE CONTACTO STICKY
   ========================================================================== */
.cz-detalles-sidebar-col {
    position: sticky;
    top: 24px;
}

.cz-contact-card {
    background: var(--cz-card-bg, #ffffff);
    border: var(--cz-border-width, 1.5px) solid var(--cz-card-border, #e2e8f0);
    border-radius: var(--cz-radius, 18px);
    padding: 26px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
}

.cz-contact-card-title {
    font-family: var(--cz-font-heading, inherit);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--cz-title-color, #0f172a);
    margin: 0 0 4px 0;
}

.cz-contact-card-sub {
    font-size: 0.88rem;
    color: var(--cz-text-color, #64748b);
    margin: 0 0 20px 0;
}

/* Cita / Visita Accordion */
.cz-schedule-details {
    margin-bottom: 16px;
    background: #f8fafc;
    border: var(--cz-border-width, 1px) solid var(--cz-card-border, #e2e8f0);
    border-radius: calc(var(--cz-radius, 12px) - 2px);
    overflow: hidden;
}

.cz-schedule-summary {
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--cz-accent, #1d4ed8);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.cz-schedule-summary::-webkit-details-marker {
    display: none;
}

.cz-schedule-body {
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Campos de Formulario */
.cz-lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cz-form-field {
    width: 100%;
}

.cz-lead-form input[type="text"],
.cz-lead-form input[type="email"],
.cz-lead-form input[type="tel"],
.cz-lead-form input[type="date"],
.cz-lead-form select,
.cz-lead-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    padding: 11px 14px;
    font-size: 0.95rem;
    color: var(--cz-title-color, #0f172a);
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
    line-height: normal;
}

.cz-lead-form input[type="text"]:focus,
.cz-lead-form input[type="email"]:focus,
.cz-lead-form input[type="tel"]:focus,
.cz-lead-form select:focus,
.cz-lead-form textarea:focus {
    outline: none;
    border-color: var(--cz-accent, #2563eb);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cz-lead-form textarea {
    height: 100px;
    resize: vertical;
}

/* Checkbox RGPD */
.cz-gdpr-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}

.cz-gdpr-row input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.cz-gdpr-label {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    cursor: pointer;
}

.cz-gdpr-label a {
    color: var(--cz-accent, #2563eb);
    text-decoration: underline;
}

/* Botón Enviar */
.cz-lead-submit-btn {
    width: 100%;
    height: 48px;
    background: var(--cz-accent, #2563eb);
    color: #ffffff;
    border: none;
    border-radius: calc(var(--cz-radius, 12px) - 2px);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cz-lead-submit-btn:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.cz-lead-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Canales Directos (Teléfono & WhatsApp) */
.cz-direct-channels {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1.5px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cz-direct-channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    border-radius: calc(var(--cz-radius, 12px) - 4px);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cz-direct-channel-phone {
    background: #f8fafc;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
}

.cz-direct-channel-phone:hover {
    background: #f1f5f9;
    color: var(--cz-title-color, #0f172a);
}

.cz-direct-channel-wa {
    background: #ecfdf5;
    color: #047857;
    border: 1.5px solid #a7f3d0;
}

.cz-direct-channel-wa:hover {
    background: #d1fae5;
    color: #065f46;
}

/* Alertas de Formulario */
.cz-alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.cz-alert-box.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.cz-alert-box.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   MODAL LIGHTBOX FULLSCREEN PARA FOTOS (OCULTO POR DEFECTO)
   ========================================================================== */
.cz-fullscreen-gallery {
    display: none !important;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(10px);
    z-index: 999999;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 20px;
    box-sizing: border-box;
    user-select: none;
}

.cz-fullscreen-gallery.is-open {
    display: flex !important;
}

.cz-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    padding-bottom: 12px;
}

.cz-lightbox-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cz-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cz-lightbox-main-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-height: 72vh;
}

.cz-lightbox-img {
    max-height: 72vh;
    max-width: 88vw;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.cz-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s ease;
}

.cz-lightbox-nav:hover {
    background: var(--cz-accent, #2563eb);
    border-color: var(--cz-accent, #2563eb);
    transform: translateY(-50%) scale(1.1);
}

.cz-lightbox-prev {
    left: 10px;
}

.cz-lightbox-next {
    right: 10px;
}

.cz-lightbox-thumbs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 6px;
    max-width: 900px;
    margin: 0 auto;
}

.cz-lightbox-thumb {
    width: 68px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    opacity: 0.5;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.cz-lightbox-thumb:hover {
    opacity: 0.85;
}

.cz-lightbox-thumb.active {
    opacity: 1;
    border-color: var(--cz-accent, #2563eb);
    transform: scale(1.08);
}

/* ==========================================================================
   MODAL COMPARTIR (POPUP ELEGANTE)
   ========================================================================== */
.cz-share-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999998;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cz-share-modal-overlay.is-open {
    display: flex;
}

.cz-share-dialog {
    background: #ffffff;
    border-radius: var(--cz-radius, 18px);
    max-width: 440px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    position: relative;
    box-sizing: border-box;
}

.cz-share-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cz-share-dialog-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cz-title-color, #0f172a);
    margin: 0;
}

.cz-share-dialog-close {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cz-share-dialog-close:hover {
    background: #e2e8f0;
    color: var(--cz-title-color, #0f172a);
}

.cz-share-channels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.cz-share-channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.cz-share-channel-link.wa {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.cz-share-channel-link.fb {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.cz-share-channel-link.mail {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.cz-share-copy-box {
    display: flex;
    gap: 8px;
}

.cz-share-copy-input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #64748b;
}

.cz-share-copy-btn {
    background: var(--cz-accent, #2563eb);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.cz-share-copy-btn:hover {
    filter: brightness(0.9);
}

/* ==========================================================================
   SISTEMA UNIVERSAL DE ICONOS SVG
   ========================================================================== */
.cz-svg-icon,
.cz-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    color: var(--cz-icon-color, currentColor);
    stroke-width: var(--cz-icon-stroke, 2px);
    transition: color 0.2s ease, transform 0.2s ease;
}

/* ==========================================================================
   LAYOUTS DE GALERÍA PRO (LUXURY HERO & EDITORIAL SPLIT)
   ========================================================================== */
/* Luxury Hero (PRO): Foto panorámica superior + tira de miniaturas */
.cz-gallery-luxury-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.cz-luxury-hero-main {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: var(--cz-radius, 14px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.cz-luxury-hero-main:hover {
    filter: brightness(0.97);
}
.cz-luxury-hero-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.cz-luxury-hero-thumb {
    height: 72px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}
.cz-luxury-hero-thumb:hover,
.cz-luxury-hero-thumb.active {
    border-color: var(--cz-accent, #2563eb);
    transform: translateY(-2px);
}

/* Editorial Split (PRO): 1 vertical de gran formato (60%) + 2 apiladas (40%) */
.cz-gallery-editorial-split {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 12px;
    height: 492px;
    margin-bottom: 24px;
    border-radius: var(--cz-radius, 14px);
    overflow: hidden;
}
.cz-editorial-item {
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.2s ease;
}
.cz-editorial-item:hover {
    transform: scale(1.01);
}
.cz-editorial-item-0 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.cz-editorial-item-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}
.cz-editorial-item-2 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* ==========================================================================
   CALIFICACIÓN ENERGÉTICA PRO (ESCALA EUROPEA OFICIAL A-G)
   ========================================================================== */
.cz-energy-official-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--cz-card-border, #e2e8f0);
    border-radius: var(--cz-radius, 14px);
}
.cz-energy-bars-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 500px;
    width: 100%;
}
.cz-energy-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 32px;
}
.cz-energy-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.cz-energy-bar.grade-a { width: 40%; background: #00a651; }
.cz-energy-bar.grade-b { width: 48%; background: #50b848; }
.cz-energy-bar.grade-c { width: 56%; background: #b4d435; }
.cz-energy-bar.grade-d { width: 64%; background: #fff200; color: #1e293b; }
.cz-energy-bar.grade-e { width: 72%; background: #fdb913; }
.cz-energy-bar.grade-f { width: 80%; background: #f37023; }
.cz-energy-bar.grade-g { width: 88%; background: #ed1c24; }

.cz-energy-bar-active-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    animation: czPulseArrow 2s infinite ease-in-out;
}
@keyframes czPulseArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.cz-energy-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}
.cz-energy-metric-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.cz-energy-metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--cz-accent, #2563eb);
}
.cz-energy-metric-data {
    display: flex;
    flex-direction: column;
}
.cz-energy-metric-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.cz-energy-metric-lbl {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

/* ==========================================================================
   BLOQUE PRO: GASTOS E INFORMACIÓN FISCAL
   ========================================================================== */
.cz-expenses-card {
    margin-bottom: 24px;
}
.cz-expenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.cz-expense-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--cz-radius, 12px);
    transition: all 0.2s ease;
}
.cz-expense-pill:hover {
    background: #ffffff;
    border-color: var(--cz-accent, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.cz-expense-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--cz-accent, #2563eb);
    flex-shrink: 0;
}
.cz-expense-info {
    display: flex;
    flex-direction: column;
}
.cz-expense-val {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}
.cz-expense-lbl {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVIDAD Y MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
    .cz-detalles-main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .cz-detalles-sidebar-col {
        position: static;
    }
}

@media (max-width: 850px) {
    .cz-mosaic-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 320px;
        height: 320px;
    }
    .cz-mosaic-item-1,
    .cz-mosaic-item-2,
    .cz-mosaic-item-3,
    .cz-mosaic-item-4 {
        display: none !important;
    }
    .cz-mosaic-item-0 {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    .cz-detalles-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .cz-detalles-header-aside {
        align-items: flex-start;
        width: 100%;
    }
    .cz-detalles-actions {
        width: 100%;
    }
    .cz-action-btn {
        flex: 1;
    }
}

@media (max-width: 540px) {
    .cz-detalles-title {
        font-size: 1.6rem;
    }
    .cz-detalles-price {
        font-size: 1.8rem;
    }
    .cz-quick-specs-bar {
        grid-template-columns: 1fr 1fr;
    }
    .cz-schedule-body {
        grid-template-columns: 1fr;
    }
}

/* Badge de Certificado Energético Pro */
.cz-energy-badge-rating {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--cz-radius, 12px);
}
.cz-energy-rating-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    background: #64748b;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.cz-energy-rating-letter.grade-a { background: #16a34a; }
.cz-energy-rating-letter.grade-b { background: #65a30d; }
.cz-energy-rating-letter.grade-c { background: #84cc16; }
.cz-energy-rating-letter.grade-d { background: #eab308; }
.cz-energy-rating-letter.grade-e { background: #f97316; }
.cz-energy-rating-letter.grade-f { background: #ea580c; }
.cz-energy-rating-letter.grade-g { background: #dc2626; }
.cz-energy-rating-letter.grade-pending { background: #475569; }
.cz-energy-rating-desc {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}