/* ================================
   INMOTEK PROPERTIES - CSS STYLES
   ================================ */

/* Variables CSS */
:root {
    --inmotek-primary: #2563eb;
    --inmotek-primary-dark: #1d4ed8;
    --inmotek-secondary: #64748b;
    --inmotek-success: #10b981;
    --inmotek-danger: #ef4444;
    --inmotek-gray-50: #f9fafb;
    --inmotek-gray-100: #f3f4f6;
    --inmotek-gray-200: #e5e7eb;
    --inmotek-gray-300: #d1d5db;
    --inmotek-gray-400: #9ca3af;
    --inmotek-gray-500: #6b7280;
    --inmotek-gray-600: #4b5563;
    --inmotek-gray-700: #374151;
    --inmotek-gray-800: #1f2937;
    --inmotek-gray-900: #111827;
    --inmotek-border-radius: 8px;
    --inmotek-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --inmotek-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --inmotek-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset y estilos base */
.inmotek-search-form *,
.inmotek-properties-grid *,
.inmotek-single-property * {
    box-sizing: border-box;
}

/* ================================
   FORMULARIO DE BÚSQUEDA
   ================================ */

.inmotek-search-form {
    background: #fff;
    padding: 30px;
    border-radius: var(--inmotek-border-radius);
    box-shadow: var(--inmotek-shadow-md);
    margin-bottom: 40px;
}

.inmotek-search-form h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    color: var(--inmotek-gray-900);
}

.inmotek-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.inmotek-form-group {
    display: flex;
    flex-direction: column;
}

.inmotek-form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--inmotek-gray-700);
    font-size: 14px;
}

.inmotek-form-group input,
.inmotek-form-group select {
    padding: 10px 14px;
    border: 1px solid var(--inmotek-gray-300);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
}

.inmotek-form-group input:focus,
.inmotek-form-group select:focus {
    outline: none;
    border-color: var(--inmotek-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.inmotek-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ================================
   BOTONES
   ================================ */

.inmotek-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.inmotek-btn-primary {
    background: var(--inmotek-primary);
    color: #fff;
}

.inmotek-btn-primary:hover {
    background: var(--inmotek-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--inmotek-shadow-md);
}

.inmotek-btn-secondary {
    background: var(--inmotek-gray-100);
    color: var(--inmotek-gray-700);
}

.inmotek-btn-secondary:hover {
    background: var(--inmotek-gray-200);
}

.inmotek-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.inmotek-btn-full {
    width: 100%;
}

.inmotek-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.inmotek-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: inmotek-spin 0.6s linear infinite;
}

@keyframes inmotek-spin {
    to { transform: rotate(360deg); }
}

/* ================================
   GRID DE INMUEBLES
   ================================ */

.inmotek-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.inmotek-property-card {
    background: #fff;
    border-radius: var(--inmotek-border-radius);
    overflow: hidden;
    box-shadow: var(--inmotek-shadow);
    transition: all 0.3s;
}

.inmotek-property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--inmotek-shadow-lg);
}

.inmotek-property-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.inmotek-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.inmotek-property-card:hover .inmotek-property-image img {
    transform: scale(1.05);
}

.inmotek-no-image {
    width: 100%;
    height: 100%;
    background: var(--inmotek-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--inmotek-gray-500);
    font-weight: 500;
}

.inmotek-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inmotek-badge-operation {
    background: var(--inmotek-primary);
    color: #fff;
}

.inmotek-property-content {
    padding: 20px;
}

.inmotek-property-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--inmotek-gray-900);
    line-height: 1.4;
}

.inmotek-property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--inmotek-gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

.inmotek-property-location svg {
    flex-shrink: 0;
}

.inmotek-property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--inmotek-gray-200);
}

.inmotek-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--inmotek-gray-700);
    font-size: 14px;
}

.inmotek-feature svg {
    color: var(--inmotek-gray-500);
}

.inmotek-property-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--inmotek-gray-200);
}

.inmotek-property-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--inmotek-primary);
}

/* ================================
   INMUEBLE INDIVIDUAL
   ================================ */

.inmotek-single-property {
    background: #fff;
    padding: 40px;
    border-radius: var(--inmotek-border-radius);
    box-shadow: var(--inmotek-shadow-md);
}

.inmotek-property-header {
    margin-bottom: 30px;
}

.inmotek-single-property .inmotek-property-title {
    font-size: 32px;
    margin: 0 0 16px 0;
}

.inmotek-property-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.inmotek-property-ref {
    color: var(--inmotek-gray-600);
    font-size: 14px;
}

/* Galería */
.inmotek-property-gallery {
    margin-bottom: 40px;
}

.inmotek-gallery-main {
    width: 100%;
    height: 500px;
    border-radius: var(--inmotek-border-radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.inmotek-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inmotek-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.inmotek-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.inmotek-thumb:hover,
.inmotek-thumb.active {
    border-color: var(--inmotek-primary);
}

.inmotek-more-images {
    background: var(--inmotek-gray-200);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--inmotek-gray-700);
    cursor: pointer;
}

/* Body del inmueble */
.inmotek-property-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.inmotek-property-price-section {
    background: var(--inmotek-gray-50);
    padding: 24px;
    border-radius: var(--inmotek-border-radius);
    margin-bottom: 30px;
}

.inmotek-price-main .inmotek-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--inmotek-primary);
}

.inmotek-price-per-meter {
    color: var(--inmotek-gray-600);
    font-size: 16px;
    margin-top: 8px;
}

.inmotek-property-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.inmotek-feature-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--inmotek-gray-50);
    border-radius: var(--inmotek-border-radius);
}

.inmotek-feature-icon {
    color: var(--inmotek-primary);
}

.inmotek-feature-label {
    font-size: 13px;
    color: var(--inmotek-gray-600);
    margin-bottom: 4px;
}

.inmotek-feature-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--inmotek-gray-900);
}

.inmotek-property-description h2,
.inmotek-additional-features h2 {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: var(--inmotek-gray-900);
}

.inmotek-description-text {
    color: var(--inmotek-gray-700);
    line-height: 1.7;
    font-size: 15px;
}

.inmotek-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.inmotek-features-list li {
    padding: 8px 12px;
    background: var(--inmotek-gray-50);
    border-radius: 6px;
    font-size: 14px;
    color: var(--inmotek-gray-700);
}

.inmotek-features-list li:before {
    content: "✓";
    color: var(--inmotek-success);
    font-weight: 700;
    margin-right: 8px;
}

/* Sidebar */
.inmotek-contact-box,
.inmotek-location-box {
    background: var(--inmotek-gray-50);
    padding: 24px;
    border-radius: var(--inmotek-border-radius);
    margin-bottom: 24px;
}

.inmotek-contact-box h3,
.inmotek-location-box h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.inmotek-contact-box p {
    color: var(--inmotek-gray-600);
    margin-bottom: 20px;
}

.inmotek-contact-box .inmotek-btn {
    margin-bottom: 12px;
}

.inmotek-location-details p {
    margin: 8px 0;
    color: var(--inmotek-gray-700);
    font-size: 14px;
}

.inmotek-map {
    width: 100%;
    height: 200px;
    background: var(--inmotek-gray-200);
    border-radius: var(--inmotek-border-radius);
    margin-top: 16px;
}

/* ================================
   MENSAJES
   ================================ */

.inmotek-error,
.inmotek-no-results {
    padding: 16px 20px;
    border-radius: var(--inmotek-border-radius);
    margin: 20px 0;
}

.inmotek-error {
    background: #fef2f2;
    border-left: 4px solid var(--inmotek-danger);
    color: #991b1b;
}

.inmotek-no-results {
    background: var(--inmotek-gray-100);
    border-left: 4px solid var(--inmotek-gray-400);
    color: var(--inmotek-gray-700);
    text-align: center;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1024px) {
    .inmotek-property-body {
        grid-template-columns: 1fr;
    }
    
    .inmotek-property-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .inmotek-search-form {
        padding: 20px;
    }
    
    .inmotek-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .inmotek-form-actions {
        flex-direction: column;
    }
    
    .inmotek-properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .inmotek-single-property {
        padding: 20px;
    }
    
    .inmotek-gallery-main {
        height: 300px;
    }
    
    .inmotek-property-features-grid {
        grid-template-columns: 1fr;
    }
    
    .inmotek-single-property .inmotek-property-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .inmotek-property-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inmotek-property-price {
        text-align: center;
    }
}
