/* Estilo tipo Airbnb para ficha de propiedad */
.cntrlz-resale-property { margin: 0 auto; font-family: inherit; }
.cntrlz-resale-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cntrlz-resale-location h1 { font-size: 2rem; margin: 0; }
.cntrlz-resale-ref {
    color: #27590c;
    font-size: 2rem;
    margin-top: 4px;
    font-weight: 500;
}
.cntrlz-resale-actions { display: flex; gap: 10px; }
.cntrlz-resale-btn {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 4px;
    height: 44px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.18s, border 0.18s, color 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #3b3b3b;
    box-shadow: 0 1px 4px #0001;
    outline: none;
}
.cntrlz-resale-btn:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 2px #764ba233;
}
.cntrlz-btn-action {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0 2px;
    font-size: 1.15em;
}
.cntrlz-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    line-height: 1;
}
.cntrlz-btn-label {
    display: none;
}
@media (min-width: 600px) {
    .cntrlz-btn-label { display: inline; margin-left: 7px; font-size: 1em; font-weight: 500; }
}
.cntrlz-btn-pdf {
    color: #764ba2;
    border-color: #764ba2;
    padding: 0 10px;
}
.cntrlz-btn-pdf:hover, .cntrlz-btn-pdf:focus {
    background: #f3eaff;
    color: #4b2e83;
    border-color: #4b2e83;
}
.cntrlz-btn-share {
    color: #439ae5;
    border-color: #439ae5;
}
.cntrlz-btn-share:hover, .cntrlz-btn-share:focus {
    background: #eaf6ff;
    color: #1d4e89;
    border-color: #1d4e89;
}
.cntrlz-btn-wishlist {
    color: #e11d48;
    border-color: #e11d48;
}
.cntrlz-btn-wishlist.active, .cntrlz-btn-wishlist[aria-pressed="true"] {
    background: #e11d48;
    color: #fff;
    border-color: #e11d48;
    box-shadow: 0 2px 8px #e11d4822;
}
.cntrlz-btn-wishlist:hover, .cntrlz-btn-wishlist:focus {
    background: #fff0f3;
    color: #a60c2b;
    border-color: #a60c2b;
}
.cntrlz-resale-btn-wishlist .cntrlz-btn-icon {
    font-size: 1.3em;
}
.cntrlz-resale-share-menu {
    display: none;
    position: absolute;
    z-index: 10;
    top: 110%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 12px #0001;
    padding: 10px 0;
    min-width: 210px;
}
.cntrlz-resale-share-wrap.open .cntrlz-resale-share-menu {
    display: block;
}
.cntrlz-share-item {
    width: 100%;
    text-align: left;
    padding: 8px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: #222;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
    display: block;
}
.cntrlz-share-item:hover, .cntrlz-share-item:focus {
    background: #f3f4f6;
    color: #764ba2;
}
.cntrlz-share-feedback {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #22c55e;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.98em;
    margin-top: 4px;
    box-shadow: 0 2px 8px #22c55e22;
    z-index: 20;
}
.cntrlz-resale-gallery  { display: flex; gap: 0px; margin: 10px 0; }
.cntrlz-resale-img-main { position: relative; }
.cntrlz-resale-img-main { flex: 0 0 50%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 8px 8px 0; }
.cntrlz-resale-img-side { flex: 0 0 25%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 8px 8px 0; }
.cntrlz-resale-img img { width: 100%; height: 100% !important; object-fit: cover; display: block; margin: 0px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); cursor: pointer; }
.cntrlz-resale-noimg { width: 100%; height: 180px; background: #f3f3f3; color: #aaa; display: flex; align-items: center; justify-content: center; border-radius: 8px; margin: 8px auto; font-size: 1.1em; }
.cntrlz-resale-gallery .cntrlz-resale-img.cntrlz-resale-img-side img:first-child { margin-bottom: 8px; }
/* Popup galería */
.cntrlz-resale-popup { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.cntrlz-resale-popup-overlay { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); }
.cntrlz-resale-popup-content { position: relative; background: transparent; display: flex; align-items: center; justify-content: center; min-width: 320px; min-height: 220px; }
.cntrlz-resale-popup-img {
  max-width: 98vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  background: #fff;
  display: block;
  margin: 0 auto;
}
.cntrlz-resale-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 2em;
  color: #333;
  cursor: pointer;
  z-index: 2;
  opacity: 0.95;
}
.cntrlz-resale-popup-prev, .cntrlz-resale-popup-next {
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2em;
  color: #333;
  cursor: pointer;
  margin: 0 12px;
  z-index: 2;
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.cntrlz-resale-popup-prev { left: 8px; }
.cntrlz-resale-popup-next { right: 8px; }
.cntrlz-resale-popup-prev:hover, .cntrlz-resale-popup-next:hover, .cntrlz-resale-popup-close:hover { background: #eee; }

/*Listado de características de la propiedad*/
.list-features { display: flex; flex-wrap: wrap; gap: 15px; }
.list-features .box-feature { background: #6762fd14; padding: 10px 20px; border-radius: 4px; color: #060291; }
.list-features .min-tit { font-size: 16px; font-weight: 700; }
.list-features ul.arrow-bullet-list.grid-five { margin: 0; padding: 0; display: flex !important; }
.list-features .grid-five li { padding: 5px 20px 5px 3px; list-style: none; }


.cntrlz-resale-features
 {
    margin-bottom: 60px;
    margin-top: 60px;
}

/*mapa ubicación*/
.leaflet-grab {
    height: 300px;
}

.seccion-detalles {
    position: absolute;
    box-shadow: 0 0 10px 0 rgb(0 0 0 / 17%);
    padding: 15px 15px 15px 15px;
    border-radius: 5px 5px 5px 5px;
    background-color: #ffffffe0;
    bottom: 7px;
    z-index: 21;
    width: calc(100% - 14px);
    left: 7px;
}

.seccion-detalles .grid-four {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

@media (max-width: 900px) {
  .cntrlz-resale-popup-img {
    max-width: 100vw;
    max-height: 60vh;
  }
  .cntrlz-resale-popup-prev, .cntrlz-resale-popup-next {
    width: 38px;
    height: 38px;
    font-size: 1.5em;
    left: 4px;
    right: 4px;
    margin: 0;
    opacity: 1;
  }
  .cntrlz-resale-popup-prev { left: 4px; }
  .cntrlz-resale-popup-next { right: 4px; }
}
.cntrlz-resale-content { display: flex; gap: 32px; flex-wrap: wrap; }
.cntrlz-resale-main { flex: 1 1 70%; min-width: 320px; }
.cntrlz-resale-contact { flex: 1 1 300px; min-width: 260px; }
.cntrlz-resale-contact-box { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); padding: 18px 16px; position: sticky; top: 24px; }
@media (max-width: 900px) {
  .cntrlz-resale-gallery { flex-direction: column; }
  .cntrlz-resale-img-main, .cntrlz-resale-img-side { flex: 1 1 100%; }
  .cntrlz-resale-content { flex-direction: column; }
  .cntrlz-resale-main, .cntrlz-resale-contact { min-width: 0; }
}





/* formulario de contacto */

.form-container {
    max-width: 100%;
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}
.form-container h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}
/* Honeypot - Campo oculto para anti-spam */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}
/* Grupos de formulario */
.form-group {
    margin-bottom: 18px;
}
label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fff;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
textarea {
    resize: vertical;
    min-height: 120px;
}
/* Campos de cita */
.cita-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}
.cita-fields.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Botón de envío */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
button[type="submit"]:active {
    transform: translateY(0);
}
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
/* Mensajes de error */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    min-height: 20px;
}
/* Mensaje del formulario */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}
.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cntrlz-resale-gallery .cntrlz-resale-img.cntrlz-resale-img-side img {
    max-height: 273px;
    object-fit: cover;
}


/*Certificado eléctrico*/

    .tabla-certificacion {
        width: 100%;
        max-width: 700px;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
        margin: 20px 0;
    }
    .tabla-certificacion th {
        background: #f8f8f8;
        text-align: center;
        padding: 8px;
        font-size: 14px;
        border: 1px solid #ddd;
    }
    .tabla-certificacion td {
        border: 1px solid #ddd;
        text-align: right;
        vertical-align: middle;
        font-size: 14px;
        position: relative;
        padding: 2px;
    }
    .etiqueta {
        display: inline-block;
        width: 130px;
        height: 30px;
        color: white;
        font-weight: bold;
        line-height: 30px;
        text-align: left;
        padding-left: 10px;
        clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
        font-size: 10px;
    }
    .etiqueta span {
        font-size: 16px;
        font-weight: bold;
        margin-right: 8px;
    }
    .valor {
        display: inline-block;
        background: #222;
        color: white;
        font-weight: bold;
        padding: 3px 12px;
        border-radius: 3px;
        clip-path: polygon(100% 0, 10% 0, 0 50%, 10% 100%, 100% 100%);
        width: 90%;
        text-align: center;
    }

    .cntrlz-resale-map {
        margin-bottom: 60px;
    }

    table.tabla-certificacion {
        margin-bottom: 50px;
    }


/* Responsive design */
@media (max-width: 768px) {
    .form-container {
        margin: 5px;
        padding: 15px;
    }
    
    .form-container h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input, textarea, select, button {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 12px;
    }
    
    .cita-fields {
        padding: 12px;
    }
}
@media (max-width: 480px) {
    .form-container {
        margin: 2px;
        padding: 12px;
        border-radius: 8px;
    }
    
    .form-container h2 {
        font-size: 1.2rem;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}
/* Diseño para columnas */
@media (min-width: 1200px) {
    .form-container {
        max-width: 400px;
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .form-container {
        max-width: 380px;
    }
}
@media (min-width: 769px) and (max-width: 991px) {
    .form-container {
        max-width: 360px;
    }
}
/* Estados de validación */
.form-group.valid input,
.form-group.valid textarea,
.form-group.valid select {
    border-color: #28a745;
}
.form-group.invalid input,
.form-group.invalid textarea,
.form-group.invalid select {
    border-color: #e74c3c;
}
/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Simple styles for contact form feedback */
.form-message { margin-top: 1em; font-weight: bold; display: block; }
.form-message.success { color: #2e7d32; }
.form-message.error { color: #c62828; }