html, body {
    width: 100%;
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
    color: #2d3436;
}

.prop-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.back-btn, .share-btn {
    background: transparent;
    border: none;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: #2d3436;
    transition: background 0.2s;
}

.back-btn:hover, .share-btn:hover {
    background: #dfe6e9;
}

.back-btn svg, .share-btn svg { width: 24px; height: 24px; }

.logo-placeholder {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent, #6c5ce7);
}

/* Gallery Mosaico */
.prop-gallery {
    padding-top: 60px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 5px;
    background: #000;
}

.prop-gallery::-webkit-scrollbar {
    height: 6px;
}
.prop-gallery::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
}

.gallery-item-wrapper {
    flex: 0 0 100%;
    height: 60vh;
    scroll-snap-align: center;
}

@media(min-width: 768px) {
    .gallery-item-wrapper {
        flex: 0 0 60%;
    }
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.prop-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: #0984e3;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 6px;
    margin-bottom: 12px;
}

#prop-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    color: #2d3436;
}

.prop-price {
    font-size: 2.2rem;
    color: #6c5ce7;
    margin: 12px 0 24px 0;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}

/* Specs */
.prop-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.spec-card {
    background: #f8f9fa;
    border: 1px solid #e0e5ec;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.spec-label {
    color: #636e72;
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.spec-value {
    color: #2d3436;
    font-weight: 700;
    font-size: 1.15rem;
}

.divider {
    border: none;
    border-top: 1px solid #e0e5ec;
    margin: 30px 0;
}

/* Agent / Publisher Card */
.prop-agent-section h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 800;
}

.agent-card {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e0e5ec;
    border-radius: 16px;
    padding: 16px;
    gap: 16px;
}

.agent-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.agent-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2d3436;
}

.agent-info p {
    margin: 0;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.agent-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #f1c40f;
    font-size: 0.9rem;
    font-weight: 700;
}

.rate-advertiser {
    margin-top: 20px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e5ec;
    border-radius: 12px;
    text-align: center;
}

.rate-advertiser h5 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #2d3436;
}

.star-rating-input {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 1.8rem;
    cursor: pointer;
}

.star-rating-input .star {
    color: #dfe6e9;
    transition: color 0.2s, transform 0.2s;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
    color: #f1c40f;
    transform: scale(1.2);
}

/* Desc */
.prop-desc-section h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 800;
    color: #2d3436;
}

.prop-desc-section p {
    color: #636e72;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Amenities */
.prop-amenities-section h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 800;
}
.amenities-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amenity-badge {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sticky Footer */
.sticky-contact-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    padding: 16px 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.btn-wa-large {
    background: #25D366;
    color: white;
    width: 100%;
    max-width: 500px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s;
}

.btn-wa-large svg { width: 28px; height: 28px; }
.btn-wa-large:hover { transform: translateY(-2px) scale(1.02); }

/* Lightbox */
.lightbox-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: opacity 0.2s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px; right: 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-close svg { width: 24px; height: 24px; }

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    width: 50px; height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    color: white;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Contact Form */
.prop-contact-form-section h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 800;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e0e5ec;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media(max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #636e72;
}

.form-group input, .form-group textarea {
    padding: 12px 16px;
    border: 1px solid #dfe6e9;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.btn-submit-form {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 10px;
}

.btn-submit-form:hover {
    background: #5b4cc4;
    transform: translateY(-2px);
}

.form-success-msg {
    margin-top: 16px;
    background: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Similar Properties - Horizontal Scroll Design */
.prop-similar-section h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    font-weight: 800;
}

.similar-grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.similar-grid::-webkit-scrollbar {
    height: 6px;
}
.similar-grid::-webkit-scrollbar-thumb {
    background: #dfe6e9;
    border-radius: 10px;
}

.similar-card {
    flex: 0 0 240px; /* Tamaño compacto fijo */
    background: white;
    border: 1px solid #e0e5ec;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.similar-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.similar-card-info {
    padding: 12px;
}

.similar-card-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: #636e72;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.similar-card-price {
    font-size: 1.15rem;
    color: #2d3436;
    font-weight: 800;
    margin-bottom: 4px;
}

.similar-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #636e72;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;
    overflow: hidden;
}

.similar-card-meta {
    font-size: 0.75rem;
    color: #2d3436;
    font-weight: 600;
    display: flex;
    gap: 8px;
    border-top: 1px solid #f1f3f5;
    padding-top: 8px;
}

@media(max-width: 480px) {
    .similar-card {
        flex: 0 0 200px; /* Mas pequeno en movil */
    }
}

/* States */
.loading-state, .error-state {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.error-state .btn-primary-blue {
    margin-top: 20px;
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.spinner {
    width: 44px; height: 44px;
    border: 4px solid #dfe6e9;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Auth Modal Overrides for Property Page */
.auth-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 10500; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.auth-overlay.active { display: flex; opacity: 1; pointer-events: auto; }
.auth-card {
    background: rgba(28, 28, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; padding: 30px; width: 90%; max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative; transform: translateY(20px); transition: transform 0.3s ease;
    color: white;
}
.auth-overlay.active .auth-card { transform: translateY(0); }
.auth-close-btn {
    position: absolute; top: 15px; right: 15px; background: transparent; border: none;
    color: #a4b0be; font-size: 1.2rem; cursor: pointer; padding: 5px;
}
.auth-header h2 { color: #fff; margin-bottom: 8px; font-size: 1.5rem; }
.auth-header p { color: #a4b0be; font-size: 0.9rem; margin-bottom: 25px; line-height: 1.4; }
