/* =============================================
   Kristal DDF — Single Listing Page
   ============================================= */

/* ── Theme reset overrides ────────────────────── */
/* The Kristal theme forces uppercase + wide letter-spacing on all headings
   and sets height:auto on all images. Override those for listing pages. */
.ddf-single-wrap h1,
.ddf-single-wrap h2,
.ddf-single-wrap h3 {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: inherit;
}


.ddf-single-wrap {
    max-width: 1200px;
    /* 130px top: live site has 2-row nav (~120px header) + 10px gap */
    margin: 130px auto 32px;
    padding: 0 16px;
    font-family: inherit;
}

/* ── Breadcrumb ──────────────────────────────── */
.ddf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #bbb;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ddf-breadcrumb a {
    color: #c9a84c;
    text-decoration: none;
    font-weight: 600;
}
.ddf-breadcrumb a:first-of-type::before {
    content: '←';
    margin-right: 4px;
}
.ddf-breadcrumb a:hover { text-decoration: underline; }

.ddf-breadcrumb__current {
    color: #666;
}

/* ── Layout ──────────────────────────────────── */
.ddf-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* Prevent long words / content from blowing out a grid column */
.ddf-single__left,
.ddf-single__right {
    min-width: 0;
}

/* ── Gallery Tabs ────────────────────────────── */
.ddf-gallery-tabs {
    display: flex;
    gap: 3px;
    background: #eef0f3;
    padding: 6px 6px 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ddf-tab {
    padding: 8px 16px;
    background: rgba(255,255,255,0.55);
    border: none;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.ddf-tab:hover { background: rgba(255,255,255,0.85); color: #232b2b; }
.ddf-tab.active {
    background: #232b2b;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 -2px 6px rgba(26,43,74,0.18);
}

/* ── Tab panes ───────────────────────────────── */
.ddf-tab-pane { display: none; }
.ddf-tab-pane.active { display: block; }

/* ── Photo Gallery ───────────────────────────── */
.ddf-gallery__main {
    position: relative;
    width: 100%;
    height: 360px;
    background: #111;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.ddf-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ddf-gallery__main .ddf-oh-ribbon {
    position: absolute;
    top: 22px;
    left: -38px;
    width: 160px;
    background: #232b2b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    padding: 7px 0;
    transform: rotate(-45deg);
    transform-origin: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 10;
}

.ddf-gallery__no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 15px;
}

.ddf-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
.ddf-gallery__nav:hover { background: rgba(0,0,0,0.7); }
.ddf-gallery__prev { left: 14px; }
.ddf-gallery__next { right: 14px; }

.ddf-gallery__count {
    position: absolute;
    bottom: 12px;
    right: 14px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Thumbnails ──────────────────────────────── */
.ddf-gallery__thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ddf-gallery__thumbs::-webkit-scrollbar { height: 4px; }
.ddf-gallery__thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.ddf-thumb {
    flex: 0 0 90px;
    height: 64px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s;
    border: 2px solid transparent;
}
.ddf-thumb:hover { opacity: 0.9; }
.ddf-thumb.active { opacity: 1; border-color: #232b2b; }

/* ── Map / iframes ───────────────────────────── */
#ddf-detail-map,
.ddf-map-frame {
    width: 100%;
    height: 360px;
    border-radius: 0 0 8px 8px;
    border: none;
}

/* ── Description ─────────────────────────────── */
.ddf-single__description {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.ddf-single__description h2 {
    font-size: 17px;
    font-weight: 700 !important;
    color: #232b2b;
    margin: 0 0 12px;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ddf-single__description p {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    margin: 0;
}

/* ── Right panel ─────────────────────────────── */
.ddf-single__right {
    position: sticky;
    top: 80px;
}

.ddf-single__price {
    font-size: 24px;
    font-weight: 700;
    color: #232b2b;
    margin-bottom: 4px;
}

.ddf-single__address {
    font-size: 17px;
    font-weight: 600 !important;
    color: #222;
    margin: 0 0 3px;
    line-height: 1.3;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ddf-single__city {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

/* ── Details table ───────────────────────────── */
.ddf-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ddf-details-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.ddf-details-table td {
    padding: 6px 4px;
    vertical-align: top;
}

.ddf-details-table__label {
    color: #888;
    width: 45%;
    font-weight: 500;
}

.ddf-details-table__value {
    color: #222;
    font-weight: 600;
}

/* ── Quick actions ───────────────────────────── */
.ddf-quick-actions {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.ddf-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.ddf-quick-action:last-child { border-bottom: none; }
.ddf-quick-action:hover { background: #f8f8f8; color: #232b2b; }

.ddf-quick-action__icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

/* ── BC Assessment box ───────────────────────── */
.ddf-assessment-box {
    margin-top: 14px;
    border: 1px solid #b8dbd7;
    border-radius: 6px;
    background: #eaf5f3;
    overflow: hidden;
}

.ddf-assessment-box__title {
    font-size: 10px;
    font-weight: 700;
    color: #4e9990;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 8px 12px 2px;
}

.ddf-assessment-box__total {
    font-size: 20px;
    font-weight: 700;
    color: #1a6b65;
    padding: 2px 12px 6px;
}

.ddf-assessment-box__breakdown {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #5a9e96;
    border-top: 1px solid #b8dbd7;
    padding: 6px 12px 10px;
}

/* ── Neighbourhood link ──────────────────────── */
.ddf-neighbourhood-link {
    display: block;
    margin-top: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: #232b2b;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
}
.ddf-neighbourhood-link:hover {
    background: #f0f2f5;
    color: #232b2b;
}

/* ── Back link ───────────────────────────────── */
.ddf-back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: #232b2b;
    text-decoration: none;
}
.ddf-back-link:hover { color: #c9a84c; }

/* ── Open Houses panel ───────────────────────── */
.ddf-open-houses {
    margin-top: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.ddf-open-houses__title {
    font-size: 12px;
    font-weight: 700;
    color: #232b2b;
    background: #f5f6f8;
    padding: 8px 12px;
    border-bottom: 1px solid #e8e8e8;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ddf-open-houses__list {
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.ddf-open-houses__list::-webkit-scrollbar { width: 4px; }
.ddf-open-houses__list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.ddf-open-houses__row {
    padding: 7px 12px;
    font-size: 12px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}
.ddf-open-houses__row:last-child { border-bottom: none; }

/* ── Inquiry section ─────────────────────────── */
.ddf-inquiry-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 2px solid #eee;
}

.ddf-inquiry-title {
    font-size: 22px;
    font-weight: 700 !important;
    color: #232b2b;
    margin: 0 0 24px;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ddf-inquiry-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.ddf-inquiry-agent__name {
    font-size: 15px;
    font-weight: 700;
    color: #232b2b;
    margin-bottom: 4px;
}

.ddf-inquiry-agent__email a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}
.ddf-inquiry-agent__email a:hover { color: #232b2b; }

.ddf-inquiry-row {
    margin-bottom: 14px;
}

.ddf-inquiry-row--3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.ddf-inquiry-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ddf-inquiry-label span { color: #d63638; }

.ddf-inquiry-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
}
.ddf-inquiry-input:focus {
    outline: none;
    border-color: #232b2b;
}

.ddf-inquiry-textarea {
    resize: vertical;
    min-height: 100px;
}

.ddf-inquiry-row--check {
    display: flex;
    align-items: center;
}

.ddf-inquiry-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}

.ddf-inquiry-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ddf-inquiry-row--submit {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.ddf-inquiry-btn {
    background: #232b2b;
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}
.ddf-inquiry-btn:hover { background: #c9a84c; }
.ddf-inquiry-btn:disabled { opacity: 0.6; cursor: default; }

#ddf-inq-msg {
    font-size: 13px;
    font-style: italic;
}

/* ── City Listings Banner ────────────────────── */
.ddf-city-banner {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 14px 24px;
    background: #f7f5f0;
    border-left: 3px solid #c9a84c;
}
.ddf-city-banner__title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #232b2b;
    margin: 0 0 4px;
}
.ddf-city-banner__subtitle {
    font-size: 13px;
    color: #555;
    margin: 0;
}
.ddf-city-banner__btn {
    display: inline-block;
    background: #232b2b;
    color: #fff;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}
.ddf-city-banner__btn:hover { background: #c9a84c; color: #fff; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .ddf-single-wrap {
        margin-top: 80px;
    }
    .ddf-single-layout {
        grid-template-columns: 1fr;
    }
    .ddf-single__right {
        position: static;
        order: -1;
    }
    .ddf-gallery__main,
    #ddf-detail-map,
    .ddf-map-frame {
        height: 240px;
    }
    .ddf-inquiry-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ddf-inquiry-row--3 {
        grid-template-columns: 1fr;
    }
}
