/**
 * Brandedrealtyllc MLS — Listing-Specific Styles
 *
 * Main site CSS is loaded remotely from brandedrealtyllc.com.
 * This file only covers listing components that don't exist on the main site.
 * Uses their CSS variables (--primary, --secondary, etc.) for palette consistency.
 */

/* ── Layout ────────────────────────────────────────────── */

#maincontent {
    /*padding-top: var(--header-height, 149px);*/
    min-height: 60vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Hero Section ──────────────────────────────────────── */

.listing-hero {
    background: var(--secondary, #3a3937);
    color: #fff;
    padding: 60px 0 40px;
    text-align: center;
}

.listing-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px;
}

.listing-hero .lead {
    font-size: 18px;
    opacity: 0.8;
    margin: 0;
}

/* ── Search Form ───────────────────────────────────────── */

.search-section {
    padding: 40px 0 60px;
    background: var(--gray, #f2f2f2);
}

.search-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-form__row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.search-form__group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #707070);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-form__group input,
.search-form__group select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #e7eaee);
    border-radius: 6px;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s;
}

.search-form__group input:focus,
.search-form__group select:focus {
    outline: none;
    border-color: var(--primary, #b7912e);
}

.search-form__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.btn-toggle-advanced {
    background: none;
    border: none;
    color: var(--primary, #b7912e);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
}

.btn-toggle-advanced:hover {
    color: var(--dark, #8c732a);
}

.btn-search {
    min-width: 200px;
}

/* ── Results Header ────────────────────────────────────── */

.listing-results-header {
    background: var(--secondary, #3a3937);
    color: #fff;
    padding: 40px 0 20px;
}

.listing-results-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    font-size: 16px;
    opacity: 0.8;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-sort label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 0;
}
.results-sort select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    /*color: #fff;*/
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 14px;
}

.results-sort select option {
    color: #222;
    background: #fff;
}

/* ── Listing Grid ──────────────────────────────────────── */

.listing-results {
    /*padding: 30px 0 60px;*/
    background: var(--gray, #f2f2f2);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ── Listing Card ──────────────────────────────────────── */

.listing-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.listing-card__image {
    position: relative;
    padding-top: 66%;
    background: #e0e0e0;
    overflow: hidden;
}

.listing-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .45s ease;
}

.listing-card:hover .listing-card__image img{
    transform: scale(1.1);
}


.listing-card__image.no-image,
.listing-card__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.listing-card__body {
    padding: 16px;
}

.listing-card__price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary, #b7912e);
    margin-bottom: 4px;
}

.listing-card__address {
    font-size: 15px;
    font-weight: 600;
    color: var(--body-text, #222);
}

.listing-card__city {
    font-size: 13px;
    color: var(--muted, #707070);
    margin-bottom: 10px;
}

.listing-card__details {
    display: flex;
    gap: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--body-text, #222);
    padding: 8px 0;
    border-top: 1px solid var(--border-color, #e7eaee);
}

.listing-card__details small {
    font-weight: 400;
    font-size: 12px;
    color: var(--muted, #707070);
    display: block;
}

.listing-card__subdiv {
    font-size: 12px;
    color: var(--muted, #707070);
    margin-top: 4px;
}

.listing-card__broker {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

/* ── Pagination ────────────────────────────────────────── */

.listing-pagination {
    margin: 10px 0 10px;
    text-align: center;
}

.listing-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 4px;
}

.listing-pagination li a,
.listing-pagination li span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border-color, #e7eaee);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--body-text, #222);
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}

.listing-pagination li a:hover {
    border-color: var(--primary, #b7912e);
    color: var(--primary, #b7912e);
}

.listing-pagination li.active a {
    background: var(--primary, #b7912e);
    border-color: var(--primary, #b7912e);
    color: #fff;
}

.listing-pagination li.ellipsis span {
    border: none;
    background: transparent;
}

/* ── Property Detail ───────────────────────────────────── */

.listing-detail {
    padding: 30px 0 60px;
}

.listing-detail__back {
    margin-bottom: 20px;
}

.listing-detail__back a {
    color: var(--primary, #b7912e);
    font-weight: 600;
    text-decoration: none;
}

.listing-detail__back a:hover {
    color: var(--dark, #8c732a);
}

/* Gallery */

.listing-detail__gallery {
    margin-bottom: 30px;
}

.gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #111;
}

.gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-main img.fade-out {
    opacity: 0;
}

/* Nav arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    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;
    opacity: 0;
    transition: opacity 0.25s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.gallery-nav:focus{
    outline: none;
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
    font-size: 3rem;
    padding-bottom: 8px;
}

.gallery-nav:hover {
    /*background: rgba(0, 0, 0, 0.7);*/
}

.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }

/* Photo counter badge */
.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.03em;
    pointer-events: none;
}

/* Thumbnails strip — hidden scrollbar */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.gallery-thumbs img:hover {
    opacity: 0.85;
}

.gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--primary, #b7912e);
    box-shadow: 0 0 0 1px var(--primary, #b7912e);
}

/* Header */

.listing-detail__header {
    margin-bottom: 30px;
}

.listing-detail__price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary, #b7912e);
    margin-bottom: 4px;
}

.listing-detail__address {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
}

.listing-detail__city {
    font-size: 16px;
    color: var(--muted, #707070);
}

.listing-detail__mls {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}

/* Highlights */

.listing-detail__highlights {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color, #e7eaee);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.highlight {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    border-right: 1px solid var(--border-color, #e7eaee);
}

.highlight:last-child {
    border-right: none;
}

.highlight__value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--body-text, #222);
}

.highlight__label {
    display: block;
    font-size: 12px;
    color: var(--muted, #707070);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Sections */

.listing-detail__section {
    margin-bottom: 30px;
}

.listing-detail__section h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary, #b7912e);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.detail-item {
    font-size: 15px;
    color: var(--body-text, #222);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #e7eaee);
}

.detail-item strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted, #707070);
    font-weight: 600;
    margin-bottom: 2px;
}

/* Feature tags */

.feature-tag {
    display: inline-block;
    background: var(--gray, #f2f2f2);
    padding: 2px 8px;
    margin: 2px 2px;
    font-size: 12px;
    border-radius: 3px;
    color: var(--body-text, #222);
}

/* Empty state */

.listing-empty {
    text-align: center;
    padding: 80px 20px;
}

.listing-empty h2 {
    color: var(--muted, #707070);
    margin-bottom: 10px;
}

.listing-empty a {
    color: var(--primary, #b7912e);
    font-weight: 600;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 991px) {
    #maincontent {
        /*padding-top: 149px;*/
    }

    .search-form__row {
        grid-template-columns: repeat(2, 1fr);
    }

    .listing-detail__highlights {
        flex-wrap: wrap;
    }

    .highlight {
        flex: 0 0 33.33%;
        border-bottom: 1px solid var(--border-color, #e7eaee);
    }
}

@media (max-width: 575px) {
    .search-form__row {
        grid-template-columns: 1fr;
    }

    .listing-hero h1 {
        font-size: 26px;
    }

    .listing-grid {
        grid-template-columns: 1fr;
    }

    .listing-detail__price {
        font-size: 28px;
    }

    .listing-detail__address {
        font-size: 20px;
    }

    .highlight {
        flex: 0 0 50%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .gallery-main img {
        max-height: 300px;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 3rem;
        opacity: .8;
        padding-bottom: 8px;
    }

    .gallery-nav--prev { left: 8px; }
    .gallery-nav--next { right: 8px; }
}

/* ── Search Page Header ────────────────────────────────── */
/* Uses main site's .body-container + .text-center classes for layout/bg.
   Only override what the main site doesn't handle for our context. */

/* ── Search Form Bar ──────────────────────────────────── */

.search-form__bar {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.search-form__bar-group {
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex: 1;
    border-right: 1px solid var(--border-color, #e7eaee);
    gap: 8px;
    min-width: 0;
}

.search-form__bar-group label {
    color: var(--primary, #b7912e);
    font-size: 16px;
    margin: 0;
    flex-shrink: 0;
}

.search-form__bar-group input,
.search-form__bar-group select {
    border: none;
    outline: none;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 15px;
    color: var(--body-text, #222);
    background: transparent;
    width: 100%;
    height: 56px;
    padding: 0;
}

.search-form__bar-group--price {
    flex: 1.6;
    gap: 6px;
}

.search-form__bar-to {
    font-size: 13px;
    color: var(--muted, #707070);
    flex-shrink: 0;
}

.search-form__bar-btn {
    background: var(--primary, #b7912e);
    color: #fff;
    border: none;
    padding: 0 32px;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-form__bar-btn:hover {
    background: var(--dark, #8c732a);
}

/* ── Search Form Advanced + Footer ───────────────────── */

.search-form__advanced {
    margin-top: 20px;
}

.search-form__footer {
    margin-top: 16px;
    text-align: center;
}

/* ── Results: Two-Column Layout ──────────────────────── */

.results-sidebar {
    margin-bottom: 30px;
    min-width: 297px;
}

.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    /*padding-bottom: 16px;*/
    border-bottom: 1px solid var(--border-color, #e7eaee);
}

.btn--advanced-search {
    font-size: 13px;
    padding: 5px 12px;
    border: 1px solid var(--primary, #b7912e);
    color: var(--primary, #b7912e);
    background: transparent;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.btn--advanced-search:hover {
    background: var(--primary, #b7912e);
    color: #fff;
}
.btn--advanced-search i { margin-right: 4px; }

/* ── Agent Card ───────────────────────────────────────── */

.agent-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    margin-bottom: 20px;
}

.agent-card__header {
    background: var(--secondary, #3a3937);
    color: #fff;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.agent-card__cta {
    padding: 14px 14px 0 14px;

}

.agent-card__cta .cta-line{
    margin-top:30px;
    text-align:left;
    letter-spacing: 0;
    margin-bottom: 0;
}

.agent-card__photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary, #b7912e);
    margin: 4px auto 12px;
    display: block;
}

.agent-card__arrow {
    text-align: right;
    padding-right: 10px;
    position: relative;
}

.agent-card__arrow .cta-arrow {
    width: 55px;
    height: 42px;
    fill: none;
    stroke: var(--primary, #b7912e);
    stroke-miterlimit: 40;
    stroke-width: 20;
    transform: scaleX(1) rotate(-10deg);
    position: absolute;
    right: 15px;
    top: 5px;
}

.agent-card__name {
    font-size: 17px;
    font-weight: 700;
    color: var(--body-text, #222);
    margin-bottom: 2px;
}

.agent-card__title {
    font-size: 13px;
    color: var(--muted, #707070);
    margin-bottom: 12px;
    line-height: 1.4;
}

.agent-card__contact {
    padding: 0 16px 16px;
}

.agent-card__contact p {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--body-text, #222);
}

.agent-card__contact i {
    color: var(--primary, #b7912e);
    width: 16px;
}

.agent-card__contact a {
    color: var(--primary, #b7912e);
    text-decoration: none;
    font-weight: 600;
}

.agent-card__contact a:hover {
    color: var(--dark, #8c732a);
}

/* ── TREC Links ───────────────────────────────────────── */

.trec-links {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 16px;
    margin-bottom: 20px;
}

.trec-links h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted, #707070);
    margin-bottom: 10px;
}

.trec-links a {
    display: block;
    font-size: 12px;
    color: var(--primary, #b7912e);
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.4;
}

.trec-links a:hover {
    color: var(--dark, #8c732a);
    text-decoration: underline;
}

/* ── Refine Panel ─────────────────────────────────────── */

.refine-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.refine-panel__header {
    color: var(--secondary, #3a3937);
    background: #fff;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.refine-panel__body {
    padding: 16px;
}

.refine-panel__group {
    margin-bottom: 12px;
}

.refine-panel__group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted, #707070);
    margin-bottom: 4px;
}

.refine-panel__group select,
.refine-panel__group input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border-color, #e7eaee);
    border-radius: 4px;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 14px;
    background: #fff;
    color: var(--body-text, #222);
}

.refine-panel__group select:focus,
.refine-panel__group input:focus {
    outline: none;
    border-color: var(--primary, #b7912e);
}

.refine-panel__btn {
    margin-top: 4px;
}

/* ── About Blurb ──────────────────────────────────────── */

.about-blurb {
    background: var(--secondary, #3a3937);
    color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display:none;
}

.about-blurb h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary, #b7912e);
    margin-bottom: 10px;
}

.about-blurb p {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px;
}

.about-blurb a {
    color: var(--primary, #b7912e);
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
}

.about-blurb a:hover {
    color: #d4a93a;
}

/* ── Contact Form (property detail) ──────────────────── */

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-form__group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #707070);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-form__group input,
.contact-form__group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e7eaee);
    border-radius: 6px;
    font-family: var(--primary-font, 'Quicksand', sans-serif);
    font-size: 15px;
    color: var(--body-text, #222);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.contact-form__group input:focus,
.contact-form__group textarea:focus {
    outline: none;
    border-color: var(--primary, #b7912e);
}

.contact-form__group--full {
    margin-bottom: 16px;
}

.contact-form__group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form__submit {
    text-align: left;
}

.contact-form__submit .btn {
    min-width: 200px;
}

.contact-form__required {
    display: inline-block;
    margin-left: 12px;
    font-size: 12px;
    color: #aaa;
    vertical-align: middle;
}

.contact-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
}

.contact-alert--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.contact-alert--error {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

@media (max-width: 575px) {
    .contact-form__row {
        grid-template-columns: 1fr;
    }
}

/**/
.btn.btn-block{
    min-width: 200px;
}

/* ── Responsive: New Components ───────────────────────── */

@media (max-width: 991px) {
    .search-form__bar {
        flex-direction: column;
        border-radius: 8px;
    }

    .search-form__bar-group {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #e7eaee);
    }

    .search-form__bar-group input,
    .search-form__bar-group select {
        height: 48px;
    }

    .search-form__bar-btn {
        padding: 14px;
        width: 100%;
        text-align: center;
    }

    .agent-card__cta .agent-card__arrow, .agent-card__cta .cta-line{
        display:none;
    }
    .agent-card__photo{
        margin-top:20px;
    }
}

@media (max-width: 575px) {
    .body-container h1 {
        font-size: 32px;
    }
}
