/* North Sea redesign layer — visual only; keeps existing DOM/IDs for JS */

* {
    -webkit-tap-highlight-color: rgba(14, 107, 99, 0.18);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-main);
}

h1, h2, h3, .site-nav__brand, .property-price, .pd-price, .hero-brand {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

/* —— Site nav —— */
.site-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    z-index: 1100;
}

.site-nav__brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-primary);
    gap: 0.55rem;
}

.site-nav__brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #E8F5F2 0%, transparent 45%),
        linear-gradient(145deg, #0E6B63 0%, #1A2B3C 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}

.site-nav__links {
    gap: 0.15rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav__links a,
.site-nav__links .nav-dropdown > summary {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__links a:hover,
.site-nav__links .nav-dropdown > summary:hover {
    color: var(--primary-color);
    background: var(--soft-blue);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown > summary::-webkit-details-marker { display: none; }

.nav-dropdown > summary::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
}

.nav-dropdown__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-dropdown__panel a {
    display: block;
    padding: 0.55rem 0.75rem !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
}

.nav-dropdown__panel a:hover {
    background: var(--soft-blue) !important;
}

.site-nav__auth a.nav-cta {
    background: var(--primary-color);
    color: #fff !important;
    padding: 0.4rem 0.85rem;
}

.site-nav__auth a.nav-cta:hover {
    background: var(--primary-hover);
    color: #fff !important;
}

.mobile-menu__section {
    margin: 0.75rem 0 0.25rem;
    padding: 0 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.mobile-menu__nav a {
    border-radius: 10px;
}

/* —— Home coastal hero —— */
body.home-page {
    background: var(--bg-main);
}

body.home-page .page-shell > .page-hero {
    position: relative;
    min-height: clamp(320px, 52vh, 520px);
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(14, 30, 40, 0.45) 0%, rgba(14, 30, 40, 0.55) 45%, rgba(244, 246, 245, 0.92) 88%, var(--bg-main) 100%),
        url("/static/images/hero-aberdeen-coast.jpg") center/cover no-repeat;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

body.home-page .page-hero .breadcrumbs {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    z-index: 2;
    color: rgba(255,255,255,0.75);
}

body.home-page .page-hero .breadcrumbs a {
    color: rgba(255,255,255,0.9);
}

body.home-page .page-hero__content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3.5rem;
    text-align: center;
}

body.home-page .hero-eyebrow {
    display: none;
}

body.home-page .hero-brand {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.8vw, 3.75rem);
    font-weight: 600;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0,0,0,0.35);
    margin-bottom: 0.55rem;
}

body.home-page .page-hero__content h1 {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 12px rgba(0,0,0,0.3);
    margin-bottom: 0.4rem;
}

body.home-page .hero-kicker {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.45rem;
}

body.home-page .hero-subtitle {
    color: rgba(255,255,255,0.88);
    max-width: 36rem;
    margin: 0 auto 0.5rem;
    font-size: 1rem;
}

body.home-page .container {
    margin-top: -2.75rem;
    position: relative;
    z-index: 3;
}

/* Search panel over hero */
body.home-page .search-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(26, 43, 60, 0.12);
    overflow: hidden;
}

body.home-page .search-tabs {
    background: var(--raised-panel);
    border-bottom: 1px solid var(--border-color);
}

body.home-page .tab-item--active .tab-btn,
body.home-page .tab-btn[aria-selected="true"] {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.search-btn,
.btn-primary,
.btn-inline-alt,
.btn-advanced {
    border-radius: 10px;
}

.search-btn,
.btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.search-btn:hover,
.btn-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-inline-alt {
    color: var(--primary-color);
    border-color: var(--blue-border);
    background: var(--soft-blue);
}

.bedrooms-selector button.active,
.bedroom-btn.active,
.bed-btn.active {
    background: var(--soft-blue) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* —— Property cards (PWA feed feel) —— */
.property-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.property-price {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text-primary);
}

.property-image {
    aspect-ratio: 16 / 10;
}

/* —— Map modal / map-first —— */
.map-modal__content,
.map-modal-content,
#mapModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-modal .leaflet-container,
#mapSearchContainer .leaflet-container {
    border-radius: 0 0 12px 12px;
}

.leaflet-marker-icon,
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    filter: hue-rotate(140deg) saturate(0.85);
}

/* —— Listing detail gallery-led —— */
.property-detail-carousel,
.pd-single-image {
    border-radius: 0;
    width: 100%;
}

body:has(.property-detail-container) .page-hero {
    background: transparent;
    padding-bottom: 0.5rem;
}

.property-detail-container {
    max-width: 1120px;
}

.property-detail-grid {
    gap: 1.5rem;
}

.property-image-section {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.pd-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.pd-price {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    color: var(--text-primary);
    font-weight: 600;
}

.pd-action-btn {
    border-radius: 10px !important;
    border-color: var(--border-color) !important;
}

.pd-action-btn--active,
.pd-action-btn.saved,
.pd-action-btn.active {
    background: var(--soft-blue) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.listing-save-banner {
    background: #E6F3F1 !important;
    border: 1px solid #A8D4CE !important;
    color: #1A2B3C !important;
    border-radius: 12px;
}

.listing-save-banner p {
    color: #1A2B3C !important;
    font-weight: 650;
    font-size: 1rem;
    line-height: 1.45;
}

.listing-save-banner__btn {
    background: #0E6B63 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.15rem !important;
    border: none !important;
}

.listing-save-banner__btn:hover {
    background: #0A524C !important;
    color: #ffffff !important;
}

/* —— Footer —— */
.site-footer--global {
    background: #1A2B3C;
    color: rgba(255,255,255,0.78);
    margin-top: 3rem;
    padding: 2.5rem 1.25rem 5.5rem;
}

.site-footer__brand strong {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.2rem;
}

.site-footer__col h3 {
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__col a {
    color: rgba(255,255,255,0.72);
}

.site-footer__col a:hover {
    color: #A8D4CE;
}

.site-footer__legal {
    color: rgba(255,255,255,0.45);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

/* —— Inner page heroes —— */
body:not(.home-page) .page-hero {
    background:
        linear-gradient(180deg, #E6F3F1 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 1.25rem 1.75rem;
}

body:not(.home-page) .page-hero__content h1 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

/* —— PWA bottom tab bar —— */
.pwa-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    height: var(--pwa-tabbar-h);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 24px rgba(26, 43, 60, 0.06);
    justify-content: space-around;
    align-items: stretch;
}

.pwa-tabbar a,
.pwa-tabbar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 10px;
}

.pwa-tabbar a svg,
.pwa-tabbar button svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.pwa-tabbar a.is-active,
.pwa-tabbar button.is-active {
    color: var(--primary-color);
}

.pwa-tabbar a.is-active::after,
.pwa-tabbar button.is-active::after {
    content: "";
    width: 18px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-top: 1px;
}

.back-to-top {
    background: var(--primary-color);
    box-shadow: 0 8px 24px rgba(14, 107, 99, 0.35);
}

.back-to-top:hover {
    background: var(--primary-hover);
    box-shadow: 0 12px 32px rgba(14, 107, 99, 0.4);
}

@media (max-width: 900px) {
    .site-nav__links {
        display: none;
    }

    .pwa-tabbar {
        display: flex;
    }

    body {
        padding-bottom: calc(var(--pwa-tabbar-h) + env(safe-area-inset-bottom, 0px));
    }

    .back-to-top {
        bottom: calc(var(--pwa-tabbar-h) + 1rem);
        right: 1rem;
    }

    .site-footer--global {
        padding-bottom: 6.5rem;
    }

    body.home-page .page-shell > .page-hero {
        min-height: clamp(280px, 48vh, 420px);
    }

    body.home-page .container {
        margin-top: -2rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .property-card {
        border-radius: 14px;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .site-nav__links a,
    .site-nav__links .nav-dropdown > summary {
        font-size: 0.75rem;
        padding: 0.35rem 0.4rem;
    }
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
    body.home-page .page-hero__content {
        animation: ns-rise 0.7s ease-out both;
    }
    body.home-page .search-section {
        animation: ns-rise 0.75s ease-out 0.08s both;
    }
    .property-card {
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
    }
}

@keyframes ns-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== MOCK 2 — Map-first ========== */
.map-modal {
    padding: 0 !important;
    background: rgba(10, 20, 28, 0.72) !important;
    z-index: 1600 !important;
}

.map-modal__content--split {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 0 !important;
    overflow: hidden !important;
}

.map-modal__sidebar {
    background: #1A2B3C;
    color: rgba(255,255,255,0.88);
    padding: 1.1rem 1.15rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.map-modal__sidebar .map-modal__header h3 {
    color: #fff;
    font-family: var(--font-display);
}

.map-modal__sidebar .map-modal__close {
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}

.map-modal__sidebar .map-modal__hint,
.map-modal__sidebar .map-result-count {
    color: rgba(255,255,255,0.78) !important;
}

.map-modal__sidebar .map-date-filters {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 12px !important;
    padding: 0.85rem !important;
    margin-bottom: 0 !important;
}

.map-modal__sidebar .map-date-filters__label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.map-modal__sidebar .map-date-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.map-modal__sidebar .map-date-filter-btn {
    background: rgba(255,255,255,0.14) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.28) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.map-modal__sidebar .map-date-filter-btn.active,
.map-modal__sidebar .map-date-filter-btn:hover {
    background: #0E6B63 !important;
    border-color: #0E6B63 !important;
    color: #ffffff !important;
}

.map-modal__sidebar .map-modal__actions,
.map-modal__sidebar .map-modal__actions-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.map-modal__sidebar .btn-inline-alt {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.18);
}

.map-modal__sidebar .search-btn,
.map-modal__sidebar .search-btn--compact {
    width: 100%;
}

.map-modal__map {
    position: relative;
    min-height: 100%;
    background: #dfe7e4;
}

.map-modal__map .map-container,
#mapContainer {
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Sticky selected listing — stays on-screen while map auto-searches */
.map-selected-card {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    padding: 0.7rem 0.75rem 0.75rem;
    max-width: 420px;
    margin: 0 auto;
}

.map-selected-card[hidden] {
    display: none !important;
}

.map-selected-card__close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: #EEF2F0;
    color: #1A2B3C;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.map-selected-card__inner {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding-right: 1.5rem;
}

.map-selected-card__img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    background: #EEF2F0;
}

.map-selected-card__img[hidden] {
    display: none !important;
}

.map-selected-card__inner:has(.map-selected-card__img[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

.map-selected-card__price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #1A2B3C;
}

.map-selected-card__title {
    font-size: 0.9rem;
    color: #3d4f48;
    line-height: 1.35;
    margin: 0.15rem 0 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.map-selected-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    background: #0E6B63 !important;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
}

.map-selected-card__cta:hover {
    background: #0A524C !important;
    color: #fff !important;
}

.ns-map-popup {
    padding: 2px;
    min-width: 210px;
    max-width: 260px;
}

.ns-map-popup__img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
    display: block;
}

.ns-map-popup__price {
    display: block;
    color: #1A2B3C;
    font-size: 14px;
    font-family: var(--font-display), Georgia, serif;
}

.ns-map-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.45rem 0 0.55rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    background: #0E6B63 !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
}

.ns-map-popup__title {
    color: #1A2B3C;
    font-size: 13px;
    margin-top: 2px;
}

.ns-map-popup__addr {
    color: #5C6B66;
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 980px) {
    /* On phone/app map, rely on the sticky card — hide tall Leaflet popups */
    .map-modal-open .ns-map-popup-wrap {
        display: none !important;
    }
    .map-selected-card {
        left: 0.55rem;
        right: 0.55rem;
        bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }
}

/* Results stay full-width — map lives in the Expand map modal, not a side panel */
.results-map-layout {
    display: block;
}

.results-map-layout__map {
    display: none !important;
}

.results-map-container {
    display: none !important;
}

.results-map-layout__list .properties-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 980px) {
    .map-modal__content--split {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
    .map-modal__sidebar {
        max-height: 42vh;
    }
    .results-map-layout__list .properties-grid {
        grid-template-columns: 1fr;
    }
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(14, 107, 99, 0.85) !important;
}

/* ========== MOCK 3 — PWA feed cards ========== */
.property-card {
    display: flex;
    flex-direction: column;
}

.property-image {
    position: relative;
    aspect-ratio: 16 / 11;
    min-height: 210px;
}

/* Price/title sit below the photo — not over the image (readable contrast) */
.property-image-overlay {
    display: none !important;
}

.property-price--overlay,
.property-title--overlay {
    display: none !important;
}

.property-price--inline,
.property-title--inline {
    display: block !important;
}

.property-price--inline {
    font-family: var(--font-display);
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #1A2B3C !important;
    margin: 0 0 0.2rem !important;
    line-height: 1.2;
}

.property-title--inline {
    color: #1A2B3C !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 0 0.35rem !important;
    line-height: 1.35;
}

.property-meta-row {
    color: #3d4f48 !important;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.property-content {
    padding: 0.9rem 1rem 1.05rem;
    background: #fff;
}

.property-content .property-address,
.property-content .property-detail,
.property-content .property-details {
    color: #3d4f48 !important;
}

@media (max-width: 900px) {
    .properties-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .property-card {
        border-radius: 16px;
    }
    .property-image {
        aspect-ratio: 4 / 3;
        min-height: 240px;
    }
    .property-price--inline {
        font-size: 1.55rem !important;
    }
}

/* ========== MOCK 4 — Gallery listing detail ========== */
body:has(.property-detail-container--gallery) .page-hero {
    padding: 0.85rem 1.25rem 0.5rem;
    background: transparent;
    border-bottom: none;
}

body:has(.property-detail-container--gallery) .page-hero__content h1 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}

body:has(.property-detail-container--gallery) .hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.8vw, 1.9rem);
    color: var(--primary-color);
    font-weight: 600;
}

.property-detail-container--gallery {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.property-detail-container--gallery .property-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
}

.property-image-section--hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.property-image-section--hero > .property-detail-carousel,
.property-image-section--hero > .pd-single-image,
.property-image-section--hero > .pd-image-placeholder {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #EEF2F0;
}

.pd-under-hero {
    display: grid;
    gap: 1rem;
}

/* Multi-photo carousel keeps a strong hero */
.property-image-section--hero .property-detail-carousel,
.property-image-section--hero .property-carousel {
    min-height: clamp(260px, 42vh, 460px);
    height: clamp(260px, 42vh, 460px);
    width: 100%;
}

.property-image-section--hero .property-carousel__slide img {
    width: 100%;
    height: clamp(260px, 42vh, 460px);
    object-fit: cover;
}

/* Single photo: no forced empty dark box — fit the image */
.property-image-section--hero .pd-single-image {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    background: #EEF2F0;
}

.property-detail-container--gallery .pd-panel {
    position: sticky;
    top: calc(var(--nav-height, 64px) + 0.75rem);
}

.pd-agent-link--cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #0E6B63 !important;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
}

.pd-agent-link--cta:hover {
    background: #0A524C !important;
    color: #fff !important;
}

.pd-agent-block {
    margin: 0.75rem 0 1rem;
}

.pd-agent-note {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .property-detail-container--gallery .property-detail-grid {
        grid-template-columns: 1fr;
    }
    .property-detail-container--gallery .pd-panel {
        position: static;
    }
    .property-image-section--hero .property-detail-carousel,
    .property-image-section--hero .property-carousel,
    .property-image-section--hero .property-carousel__slide img {
        min-height: 220px;
        height: 56vw;
        max-height: 340px;
    }
    .property-image-section--hero .pd-single-image {
        max-height: 300px;
    }
}

/* Detail page fillers — tools, ad, similar homes */
body:has(.property-detail-container--gallery) .page-hero {
    padding: 0.65rem 1rem 0.35rem !important;
}
body:has(.property-detail-container--gallery) .page-hero__content {
    padding-bottom: 0.25rem;
}
body:has(.property-detail-container--gallery) .listing-save-banner {
    margin-top: 0.5rem;
}

.pd-fillers {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.25rem;
}

.pd-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.pd-tools a {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pd-tools a:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pd-tools strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    color: #1A2B3C;
}

.pd-tools span {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.pd-ad {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0b1f3a;
    box-shadow: var(--shadow);
}

.pd-ad a {
    display: block;
    line-height: 0;
}

.pd-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* APS landscape creative — show full 2:1 artwork */
.pd-ad--aps {
    background: #0b1f3a;
}

.pd-ad--aps img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    aspect-ratio: 2 / 1;
    background: #0b1f3a;
}

/* WhiskyPricer — full creative, ~60% smaller (40% width), never cropped */
.pd-ad--whisky {
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
}

.pd-ad--whisky a {
    width: 40%;
    max-width: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #1a120b;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.pd-ad--whisky img {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain;
    object-position: center top;
    display: block;
}

@media (max-width: 700px) {
    .pd-ad--whisky a {
        width: 55%;
        max-width: 220px;
    }
}

.pd-similar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1rem 1.15rem;
    box-shadow: var(--shadow);
}

.pd-similar--under .pd-similar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .pd-similar--under .pd-similar__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

.pd-similar h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.85rem;
    color: #1A2B3C;
}

.pd-similar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.pd-similar__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pd-similar__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pd-similar__card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #EEF2F0;
}

.pd-similar__card .pd-similar__body {
    padding: 0.65rem 0.75rem 0.8rem;
}

.pd-similar__card .pd-similar__price {
    font-family: var(--font-display);
    font-weight: 700;
    color: #1A2B3C;
    font-size: 1.05rem;
}

.pd-similar__card .pd-similar__title {
    font-size: 0.88rem;
    color: #3d4f48;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.pd-similar__empty,
.pd-similar__loading {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

@media (max-width: 700px) {
    .pd-tools {
        grid-template-columns: 1fr;
    }
}

/* Results-grid advertise cards — fill listing-card height (no dead space under banner) */
.property-ad-card--promo {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow) !important;
}

.property-ad-card--promo .property-ad-card__link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100%;
    justify-content: stretch;
    color: inherit;
    text-decoration: none !important;
    background: transparent;
}

.property-ad-card--promo .property-ad-card__media {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
    background: #0b1f3a;
    /* Keep the 2:1 creatives fully visible — never crop */
    aspect-ratio: 2 / 1;
}

.property-ad-card--promo .property-ad-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.property-ad-card--promo .property-ad-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    padding: 1.05rem 1.15rem 1.2rem;
    background: #fff;
    color: #1A2B3C;
}

.property-ad-card--promo .property-ad-card__eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0E6B63;
}

.property-ad-card--promo .property-ad-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1A2B3C;
}

.property-ad-card--promo .property-ad-card__blurb {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #5C6B66;
}

.property-ad-card--promo .property-ad-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    background: #0E6B63;
    color: #fff !important;
    font-weight: 700;
    text-align: center;
}

.property-ad-card--promo:hover .property-ad-card__cta {
    background: #0A524C;
    color: #fff !important;
}

/* ---------- Contact page ---------- */
.contact-layout {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
    gap: 1.5rem;
    align-items: start;
}

.contact-form-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 1.75rem 1.85rem 2rem;
}

.contact-form-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    color: #1A2B3C;
    margin: 0 0 0.35rem;
}

.contact-form-card__lead {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.contact-form {
    display: grid;
    gap: 1.15rem;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1A2B3C;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #F7FAF9;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-field textarea {
    min-height: 180px;
    resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: #0E6B63;
    box-shadow: 0 0 0 3px rgba(14, 107, 99, 0.16);
    background: #fff;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.35rem;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: #0E6B63;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.contact-btn:hover {
    background: #0A524C;
}

.contact-btn:active {
    transform: translateY(1px);
}

.contact-aside {
    display: grid;
    gap: 1rem;
}

.contact-aside__card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.3rem 1.35rem;
    box-shadow: var(--shadow);
}

.contact-aside__card h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 0.45rem;
    color: #1A2B3C;
}

.contact-aside__card p,
.contact-aside__card li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

.contact-aside__card ul {
    margin: 0.55rem 0 0;
    padding-left: 1.15rem;
}

.contact-aside__card li + li {
    margin-top: 0.35rem;
}

.contact-aside__email {
    display: inline-block;
    margin-top: 0.65rem;
    font-weight: 700;
    color: #0E6B63 !important;
    word-break: break-word;
}

.contact-aside__card--accent {
    background:
        linear-gradient(160deg, rgba(14, 107, 99, 0.08), transparent 55%),
        #fff;
    border-color: rgba(14, 107, 99, 0.28);
}

.contact-aside__cta {
    display: inline-flex;
    margin-top: 0.85rem;
    font-weight: 700;
    color: #0E6B63 !important;
}

.contact-alert {
    border-radius: 12px;
    padding: 0.95rem 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.contact-alert--success {
    background: #E8F6F1;
    color: #0A524C;
    border: 1px solid rgba(14, 107, 99, 0.25);
}

.contact-alert--error {
    background: #FEECEC;
    color: #8B1E1E;
    border: 1px solid rgba(139, 30, 30, 0.2);
}

.contact-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-form__row {
        grid-template-columns: 1fr;
    }
    .contact-form-card {
        padding: 1.35rem 1.2rem 1.5rem;
    }
}
