/* style.css */
:root {
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --accent: #2997ff;
    --accent-hover: #0071e3;
    --border-color: #d2d2d7;
    --hero-overlay: rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo span {
    font-weight: 300;
    color: var(--text-secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}

/* Buttons */
.btn-primary {
    background-color: var(--text-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 980px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-primary:hover {
    background-color: #000;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    padding: 0.8rem 1.8rem;
    border-radius: 980px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    transform: scale(1.02);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2075&q=80');
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    margin-top: 5rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin: 1.5rem 0 2rem;
    font-weight: 300;
}

/* Properties Section */
.properties-section {
    padding: 6rem 4rem;
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Controles de Filtros y Mapa */
.filters-container {
    max-width: 1400px;
    margin: 0 auto 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.filter-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 0 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    flex: 1;
}

.filter-group:focus-within {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.1);
}

.filter-icon {
    color: var(--accent);
    margin-right: 0.8rem;
}

.filter-input,
.filter-select {
    border: none;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
}

.filter-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-toggle-view {
    padding: 0.8rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-toggle-view:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(41, 151, 255, 0.2);
}

.btn-toggle-view.active-map {
    background-color: var(--accent);
}

/* Map Container */
.map-container {
    max-width: 1400px;
    margin: 0 auto 4rem;
    height: 600px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    opacity: 1;
    transition: opacity 0.3s, height 0.3s;
}

.map-container.hidden {
    display: none;
    opacity: 0;
}

#propertiesMap {
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #f0f0f0;
    /* Color de fondo para depuración */
}

/* Leaflet Custom Popups (Apple Style) */
.leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 250px !important;
}

.map-popup-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.map-popup-info {
    padding: 1rem;
}

.map-popup-price {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.map-popup-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.map-popup-btn {
    display: block;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.map-popup-btn:hover {
    background: #e5e5ea;
}

.leaflet-container a.leaflet-popup-close-button {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    padding: 0 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.property-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.property-image-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f7;
}

.property-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.property-card:hover .property-image {
    transform: scale(1.06);
}

.property-info {
    padding: 2rem;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.property-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.detail-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-inquire {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-inquire:hover {
    background-color: #e5e5ea;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: #e5e5ea;
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    font-size: 0.95rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--bg-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.2);
}

.property-badge-group {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.property-badge {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.btn-submit {
    width: 100%;
    background-color: var(--text-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: #000;
    transform: scale(1.02);
}

.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-message i {
    font-size: 3rem;
    color: #34c759;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Footer */
footer {
    padding: 3rem 4rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-logo span {
    font-weight: 300;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    .properties-section {
        padding: 4rem 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Property Details Page Styles --- */

.solid-nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.property-page-header {
    margin-top: 5rem;
    padding: 2rem 4rem;
}

.container-fluid {
    max-width: 1600px;
    margin: 0 auto;
}

.image-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 2/3 and 1/3 split */
    grid-template-rows: repeat(2, 300px);
    /* Two equal height rows on the right */
    gap: 12px;
    height: 612px;
    /* 300+300+gap */
    border-radius: 28px;
    overflow: hidden;
    background: #f5f5f7;
}

.image-gallery.single-image {
    grid-template-columns: 1fr;
}

.main-image {
    grid-column: 1;
    grid-row: 1 / span 2;
    /* Spans full height of the gallery */
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

#currentMainImage {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* FILL SPACE WITHOUT BLACK LINES */
    transition: opacity 0.3s ease;
    z-index: 5;
    background: transparent;
}

.image-gallery:not(.single-image) #currentMainImage {
    object-fit: cover !important;
    /* Consistent with previous fix */
}

.main-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.side-images {
    grid-column: 2;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    height: 100%;
}

.thumb-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 16px;
    background: #f5f5f7;
}

.thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s, opacity 0.3s;
    cursor: pointer;
}

.thumb-container img:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

#propertiesMap .leaflet-popup-content-wrapper {
    overflow: hidden;
}

.leaflet-popup-content img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.property-page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem 6rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.ref-badge {
    background: var(--bg-secondary);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-block;
    margin-bottom: 1rem;
}

.p-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.p-location {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.p-key-stats {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-box i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.stat-box span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stat-box strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.p-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.p-section.border-none {
    border-bottom: none;
}

.p-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.p-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.features-list i {
    color: #34c759;
    /* Apple green */
}

.tech-spec-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
}

.tech-spec {
    font-size: 0.95rem;
}

.property-sidebar {
    position: relative;
}

.sticky-contact-box {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.s-price {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.s-taxes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 1rem;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.agent-info strong {
    display: block;
    font-size: 0.95rem;
}

.agent-info p {
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 1024px) {
    .property-page-content {
        grid-template-columns: 1fr;
        padding: 0 2rem 4rem;
    }

    .property-page-header {
        padding: 2rem;
    }

    .image-gallery {
        grid-template-columns: 1fr;
        height: auto;
    }

    .side-images {
        display: none;
        /* Hide side images on small screens for simplicity, like many premium apps */
    }

    .main-image {
        height: 60vh;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}

/* Admin Styles */
.btn-admin-access {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-admin-access:hover {
    opacity: 1;
    color: var(--text-primary);
}

.admin-modal-wide {
    max-width: 800px;
    width: 95%;
}

.form-row-flex {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
    min-width: 150px;
}

.flex-2 {
    flex: 2;
    min-width: 250px;
}

.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.image-upload-area:hover {
    border-color: var(--accent);
    background: rgba(41, 151, 255, 0.05);
    color: var(--accent);
}

.image-upload-area i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.preview-miniatures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-modal-wide {
    max-width: 800px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
    position: relative;
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
}

.admin-prop-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Admin */
.admin-prop-list::-webkit-scrollbar,
#adminFormScrollArea::-webkit-scrollbar {
    width: 6px;
}

.admin-prop-list::-webkit-scrollbar-thumb,
#adminFormScrollArea::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
}

.admin-prop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.admin-prop-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-prop-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-prop-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f7;
}

.admin-prop-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.admin-prop-text p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--text-secondary);
}

.admin-prop-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-edit-sm:hover {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

@media (max-width: 600px) {
    .admin-prop-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-prop-actions {
        width: 100%;
    }

    .btn-edit-sm {
        flex: 1;
        text-align: center;
    }
}

/* Lightbox Modal Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(12px);
    overflow: hidden;
    cursor: zoom-out;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 50px;
    font-weight: 200;
    transition: 0.3s;
    line-height: 1;
    z-index: 10000;
}

.lightbox-close:hover {
    color: white;
    cursor: pointer;
}

/* GLOBAL IMAGE FIX: NO MORE BLACK LINES */
.main-image img,
#currentMainImage,
.side-images img,
.thumb-container img,
.map-popup-img {
    object-fit: cover !important;
    /* FILL THE SPACE */
    object-position: center 40% !important;
    /* Architecture focus */
    background-color: #f5f5f7 !important;
    width: 100% !important;
    height: 100% !important;
}

.lightbox-content {
    object-fit: contain !important;
    /* Only fullscreen visor keeps original ratio */
    background-color: transparent !important;
}

/* HERO SEARCH BAR STYLES */
.hero-search-container {
    margin-top: 2rem;
    margin-bottom: 3rem;
    /* Extra space to separate from the button */
    width: 100%;
    max-width: 700px;
    z-index: 100;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-search-box i {
    color: white;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

.hero-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.btn-search-hero {
    background: white;
    color: black;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-search-hero:hover {
    transform: scale(1.05);
    background: #f5f5f7;
}

@media (max-width: 600px) {
    .hero-search-box {
        padding-left: 1rem;
    }

    .btn-search-hero {
        padding: 0.8rem 1.2rem;
    }
}

@media (max-width: 900px) {
    .image-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 400px auto;
        height: auto;
    }

    .main-image {
        grid-row: 1;
    }

    .side-images {
        grid-column: 1;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px;
    }

    .thumb-container {
        height: 150px;
    }
}