﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.main-container {
    overflow-x: hidden;
    overflow-x: clip;
}

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.logo {
    height: 5rem;
    width: auto;
    object-fit: contain;
}

.logo-brand {
    width: 250px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Desktop tweak only if you want a cap (optional)
@media (min-width: 769px) {
    .logo-brand { width: 400px; }
}
*/

.property-header {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    padding: clamp(1rem, 3.5vw, 2rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.property-title {
    font-size: 2rem;
    font-size: clamp(1.65rem, 1.2rem + 3vw, 2.5rem);
    font-weight: 700;
    color: #1e293b;
    line-height: 1.08;
    margin-bottom: 0.2rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.property-location {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.property-price {
    font-size: 1.75rem;
    font-size: clamp(1.45rem, 1.1rem + 2vw, 2rem);
    font-weight: 700;
    color: #1e3a8a;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.property-ref {
    display: inline-block;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #475569;
    font-size: 1rem;
    font-weight: 500;
}

.gallery-container {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ---------- NO-CROP CAROUSEL (contain) FOR MAIN DETAIL PAGE ---------- */
.carousel-item {
    height: 360px;
    height: clamp(300px, 60vh, 600px);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
        display: block;
    }

/* Make the prev/next icons darker for white backgrounds */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    filter: none; /* ensure our custom SVG color shows */
}

/* Override Bootstrap default white icons with darker ones */
.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%231e293b' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.354a.5.5 0 0 1 0 .707L6.414 7l4.94 4.939a.5.5 0 1 1-.707.707l-5.647-5.646a.5.5 0 0 1 0-.708l5.647-5.646a.5.5 0 0 1 .707 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%231e293b' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.354a.5.5 0 0 0 0 .707L9.586 7l-4.94 4.939a.5.5 0 1 0 .707.707l5.647-5.646a.5.5 0 0 0 0-.708L5.354 1.354a.5.5 0 0 0-.708 0z'/%3e%3c/svg%3e");
}

/* Optionally make the whole control buttons a bit more opaque for visibility */
.carousel-control-prev,
.carousel-control-next {
    opacity: .85;
}

.property-details,
.agent-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    padding: clamp(1rem, 3.5vw, 2rem);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.35rem;
    font-size: clamp(1.2rem, 1.05rem + 1vw, 1.5rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

    .section-title::before {
        content: '';
        width: 4px;
        height: 24px;
        background: #1e3a8a;
        border-radius: 2px;
        flex: 0 0 auto;
        margin-top: 0.15rem;
    }

.description {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

    .feature-item:hover {
        border-color: #1e3a8a;
        background: #f1f5f9;
        transform: translateY(-2px);
    }

.feature-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.feature-icon {
    min-width: 2rem;
    background: #1e3a8a;
    border-radius: 0.5rem;
    color: white;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
}

/* Agent portrait */
.agent-profile {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    grid-template-columns: clamp(118px, 42%, 158px) minmax(0, 1fr);
    gap: 1rem;
    gap: clamp(0.9rem, 2vw, 1.25rem);
    align-items: start;
}

.agent-portrait {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(160deg, #e2e8f0 0%, #cbd5e1 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

    .agent-portrait::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 48%, rgba(15, 23, 42, 0.08) 100%);
        pointer-events: none;
    }

    .agent-portrait img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

        .agent-portrait img.agent-portrait-image--fallback {
            object-fit: contain;
            object-position: center;
            padding: 1rem;
        }

.agent-profile .agent-details {
    min-width: 0;
    max-width: 100%;
    padding-top: 0.35rem;
}

    .agent-profile .agent-details > * {
        max-width: 100%;
    }

    .agent-profile .agent-details h3 {
        font-size: 1.15rem;
        color: #0f172a;
        font-size: clamp(1.05rem, 0.95rem + 0.65vw, 1.35rem);
        line-height: 1.08;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .agent-profile .agent-details p {
        color: #475569;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .agent-profile .agent-details a {
        color: #1e3a8a;
        font-weight: 600;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

        .agent-profile .agent-details a:hover {
            text-decoration: underline;
        }

/* Stats (if you use them later) */
.stat-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.call-agent {
    background-color: #1e3a8a;
    color: white;
    border-radius: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
}

    .call-agent:hover {
        background-color: #3746c4;
        color: white;
    }

.email-agent {
    background-color: transparent;
    border: 1px solid #1e3a8a;
    color: #1e3a8a;
    border-radius: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
}

    .email-agent:hover {
        background-color: #1e3a8a;
        color: white;
    }

.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 0;
}

@media (min-width: 769px) {
    .logo {
        height: 6rem;
    }
}

@media (max-width: 768px) {
    .property-title {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .agent-profile {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

        .agent-profile .agent-details {
            text-align: center;
            padding-top: 0;
        }

    .agent-portrait {
        width: min(100%, 220px);
    }
}

/* ============================
   Brochure / Property Menu Additions
   ============================ */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    border-right: 1px solid rgba(0,0,0,.08);
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1040;
}

    .sidebar.active {
        transform: translateX(0);
    }

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.menu-close-btn {
    float: right;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.sidebar-nav {
    padding: .75rem 1rem;
}

.property-nav-item {
    display: block;
    padding: .5rem .25rem;
    color: inherit;
    text-decoration: none;
    border-radius: .5rem;
}

    .property-nav-item:hover {
        background: rgba(0,0,0,.04);
    }

/* Main shifts when sidebar opens */
.main-content {
    transition: transform .25s ease;
}

    .main-content.shifted {
        transform: translateX(280px);
    }

/* Header toggle */
.menu-toggle {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
}

/* Menu header */
.menu-header {
    padding: 1rem 0;
}

.menu-header-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Cards grid */
.property-card-container {
    display: none;
}

    .property-card-container.active {
        display: block;
    }

.property-card {
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .property-card .gallery-section {
        margin-bottom: 0;
    }

    /* Ensure the brochure card carousels fill top-to-bottom properly */
    .property-card .carousel-inner.ratio-16x9 {
        aspect-ratio: 16/9;
    }

        .property-card .carousel-inner.ratio-16x9 .carousel-item {
            height: 100%;
        }

            .property-card .carousel-inner.ratio-16x9 .carousel-item img {
                width: 100%;
                height: 100%;
                object-fit: cover; /* fill the area */
                object-position: center;
                display: block;
            }
    /* Override global fixed height inside cards so aspect-ratio rules drive height */
    .property-card .carousel-item {
        height: auto;
    }

.property-link {
    color: inherit;
    text-decoration: none;
}

.property-content {
    padding: 1rem;
}

.property-card-ref {
    font-size: .9rem;
    color: #6b7280;
    margin-bottom: .25rem;
}

.property-card-title {
    font-size: 1.05rem;
    margin: .25rem 0 .5rem;
}

.property-card-location {
    color: #6b7280;
    font-size: .95rem;
    margin-bottom: .25rem;
}

.property-card-price {
    font-weight: 600;
    font-size: 1.05rem;
}

/* Pagination */
.pagination .page-link {
    color: #1e3a8a;
    border-color: rgba(0,0,0,.125);
}

    .pagination .page-link:hover {
        color: #1e3a8a;
        background-color: rgba(30,58,138, .06);
    }

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.pagination .page-item.disabled .page-link {
    color: #9ca3af;
    pointer-events: none;
    background-color: #fff;
    border-color: rgba(0,0,0,.125);
}

.header-buyerProperties {
    background: transparent;
    box-shadow: none;
    margin-bottom: 2rem;
}

    .header-buyerProperties .header-inner {
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: .75rem;
        padding: .75rem 1rem;
    }

    .header-buyerProperties .logo {
        height: 5rem;
        object-fit: contain;
    }

@media (min-width: 769px) {
    .header-buyerProperties .logo {
        height: 6rem;
    }
}

.vendor-form-card {
    width: 100%;
}

.vendor-alert {
    width: 100%;
    border-radius: 0.75rem;
}

.vendor-form {
    display: grid;
    gap: 1rem;
}

.vendor-field {
    display: grid;
    gap: 0.4rem;
}

.vendor-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: block;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vendor-readonly {
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
    color: #334155;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vendor-input {
    border-radius: 0.6rem;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 0.8rem;
    box-shadow: none;
}

.vendor-input:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.12);
}

.vendor-save-btn {
    min-width: 140px;
}

.vendor-rate-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.vendor-rate-input {
    flex: 1 1 auto;
}

.vendor-rate-period {
    flex: 0 0 auto;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
    color: #334155;
    min-width: 110px;
    text-align: center;
    font-weight: 600;
}

.vendor-confirm-modal .modal-content {
    border: 1px solid #dbe4ef;
    border-radius: 1.25rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    max-height: 90vh;
    max-height: min(90dvh, 760px);
}

.vendor-confirm-modal .modal-header,
.vendor-confirm-modal .modal-footer {
    border-color: #e2e8f0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    background: #ffffff;
}

.vendor-confirm-modal .modal-header {
    align-items: flex-start;
    gap: 0.75rem;
}

.vendor-confirm-modal .modal-title {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.15rem;
    font-size: clamp(1.05rem, 0.95rem + 0.8vw, 1.35rem);
    line-height: 1.2;
    min-width: 0;
}

.vendor-confirm-modal .modal-body {
    padding: 1rem 1.25rem 1.25rem;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 38%);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.vendor-confirm-modal .btn-close {
    flex: 0 0 auto;
    margin: 0.1rem 0 0 auto;
}

.vendor-modal-dialog {
    width: calc(100% - 1.5rem);
    max-width: 26rem;
}

.vendor-modal-summary {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.vendor-modal-thumbnail {
    background: #e2e8f0;
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 124px;
    align-self: stretch;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.vendor-modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vendor-modal-meta {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    padding: 0.6rem 0.75rem 0.8rem;
    min-width: 0;
    min-height: 124px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vendor-modal-meta .property-ref {
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
}

.vendor-modal-title-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-top: 0.45rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vendor-modal-address {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
    margin-top: 0.45rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vendor-modal-section {
    margin-bottom: 1rem;
}

.vendor-modal-copy {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vendor-confirm-modal .modal-body .vendor-field {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    padding: 0.4rem 0.55rem 0.7rem;
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.12);
}

.vendor-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.vendor-modal-actions .btn {
    flex: 1 1 180px;
}

.vendor-modal-input {
    min-height: 3.05rem;
    font-size: 1rem;
    background: #fff;
}

.vendor-modal-rate-row .vendor-rate-period {
    min-width: 96px;
    align-self: stretch;
}

@media (max-width: 576px) {
    .vendor-confirm-modal .modal-dialog {
        margin: 0.75rem;
    }

    .vendor-confirm-modal .modal-body,
    .vendor-confirm-modal .modal-header,
    .vendor-confirm-modal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .vendor-confirm-modal .modal-footer {
        gap: 0.5rem;
    }

    .vendor-confirm-modal .modal-footer .btn {
        width: 100%;
    }

    .vendor-modal-actions {
        gap: 0.5rem;
    }

    .vendor-modal-actions .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .vendor-modal-summary {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .vendor-modal-thumbnail {
        min-height: 104px;
    }

    .vendor-modal-meta {
        min-height: 104px;
    }

    .vendor-rate-row {
        flex-direction: column;
        align-items: stretch;
    }

    .vendor-rate-period {
        min-width: 0;
        text-align: left;
    }
}

@media (max-width: 420px) {
    .vendor-modal-summary {
        grid-template-columns: 1fr;
    }

    .vendor-modal-thumbnail {
        width: min(100%, 190px);
        min-height: 132px;
        justify-self: center;
    }

    .vendor-modal-meta {
        min-height: 0;
    }
}
