/* assets/css/vitrine.css */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: 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;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 1100px;
    padding-top: 80px;
}

.hero-title {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    color: #e2e8f0;
    font-size: 1.25rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease;
}

/* Search Box */
.search-box {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 1.2s ease;
    width: 100%;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 2.2fr 1fr auto;
    gap: 15px;
    align-items: flex-end;
}

.search-field {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.search-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-field input, .search-field select {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    height: 46px;
    transition: var(--transition);
    width: 100%;
}

.search-field input:focus, .search-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn-container {
    display: flex;
    align-items: flex-end;
}

.search-btn-container .btn {
    height: 46px;
    margin-top: 0;
    white-space: nowrap;
    padding: 0 28px;
}

/* Properties Section */
.properties-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Property Card */
.property-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

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

.property-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.property-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.property-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.property-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.property-carousel-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-img img {
    transform: scale(1.1);
}

.property-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-carousel--modal .property-carousel-img {
    border-radius: var(--radius);
    height: 100%;
}

.property-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.85;
}

.property-carousel-control:hover {
    background: var(--primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.property-carousel-control.prev {
    left: 10px;
}

.property-carousel-control.next {
    right: 10px;
}

.property-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    max-width: 80%;
    overflow-x: auto;
}

.property-carousel-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.property-carousel-dot.is-active {
    background: #ffffff;
    width: 18px;
}

.property-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.property-badge.venda {
    background: #ea580c;
}

.property-badge.dupla {
    background: #7c3aed;
}

.property-photo-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 5;
    background: rgba(15, 23, 42, 0.75);
    color: #f8fafc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
}

.property-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.property-zoom-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    color: white;
}

.property-content {
    padding: 25px;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.property-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-location {
    color: var(--text-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    color: var(--text-light);
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-item h4 {
    margin-bottom: 5px;
}

.contact-form-container {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: #94a3b8;
    margin-top: 20px;
    max-width: 300px;
}

.footer-links h4, .footer-social h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    background: #0b1120;
    padding: 20px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Loader */
.loader-container {
    text-align: center;
    padding: 50px 0;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Alert */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

.imovel-interessado {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-clear {
    background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    overflow: auto;
}
.modal-content {
    background-color: var(--surface);
    margin: 3% auto;
    border-radius: 18px;
    width: 90%;
    max-width: 1040px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}
.close-modal {
    color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer;
    position: absolute; right: 20px; top: 15px; z-index: 10;
}
.close-modal:hover { color: black; }
.modal-body { padding: 30px; }

.modal-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 34px;
    align-items: start;
}

.modal-media {
    position: relative;
    min-height: 430px;
}

.modal-media .property-carousel,
.modal-media .property-carousel-track,
.modal-media .property-carousel-slide,
.modal-media .property-carousel-img {
    height: 100%;
}

.modal-media .property-carousel-img {
    border-radius: 14px;
}

.modal-info {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-top: 6px;
}

.modal-info h2 {
    margin-bottom: 14px;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.modal-info .property-location {
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: var(--text-light);
}

.modal-price {
    font-size: 2.15rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 22px;
    line-height: 1;
}

.modal-price span {
    font-size: 1.05rem;
    font-weight: 500;
}

.modal-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.modal-features .feature {
    background: #f8fbff;
    padding: 18px 16px;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    align-items: flex-start;
}

.modal-features .feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.modal-features .feature span {
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 500;
}

.modal-desc {
    color: var(--text-light);
    margin-bottom: 28px;
}

.modal-desc h4 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.modal-interest-btn {
    margin-top: auto;
    height: 56px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 992px) {
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-btn-container .btn { width: 100%; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .modal-grid { grid-template-columns: 1fr; }
    .modal-media { min-height: 320px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .search-form { grid-template-columns: 1fr; }
    .nav-links, .nav-actions { display: none; }
    .mobile-menu-btn { display: block; }
    .properties-grid { grid-template-columns: 1fr; }
    .property-img { height: 220px; }
    .modal-media { min-height: 260px; }
    .modal-info h2 { font-size: 1.6rem; }
    .modal-price { font-size: 1.8rem; }
    .property-carousel-control { width: 36px; height: 36px; }
}

/* ==========================================================================
   PHOTO LIGHTBOX / FULLSCREEN VIEWER (ZOOM)
   ========================================================================== */
.photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.photo-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
    box-sizing: border-box;
    user-select: none;
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lightbox-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    max-width: 600px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-counter {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.lightbox-actions {
    display: flex;
    gap: 10px;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    color: white;
}

.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    min-height: 0;
}

.lightbox-image-wrapper {
    max-width: 90vw;
    max-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.25s ease;
    cursor: zoom-in;
}

.lightbox-image.is-zoomed {
    cursor: zoom-out;
    transform: scale(1.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.12);
    border-color: var(--primary);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-thumbnails-wrapper {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    max-width: 100%;
    padding: 4px 2px;
}

.lightbox-thumb {
    width: 64px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
    opacity: 0.5;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.lightbox-thumb:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.lightbox-thumb.is-active {
    opacity: 1;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
}

.property-modal-zoom-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 6;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.property-modal-zoom-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-container {
        padding: 12px 10px;
    }
    .lightbox-title {
        font-size: 0.95rem;
        max-width: 200px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .lightbox-nav.prev {
        left: 8px;
    }
    .lightbox-nav.next {
        right: 8px;
    }
    .lightbox-image,
    .lightbox-image-wrapper {
        max-height: calc(100vh - 180px);
    }
    .lightbox-thumb {
        width: 50px;
        height: 38px;
    }
}
