/**
 * PJD Directory — frontend styles.
 *
 * Covers:
 *   – Search form and autocomplete dropdown
 *   – Result card grid (24-up, responsive)
 *   – Map container and popup
 *   – Amenity icon strip
 *   – Coastal badge
 *   – Pagination
 *
 * Colour tokens
 * ─────────────
 * --pjd-navy       #051435  Midnight Navy (primary brand)
 * --pjd-navy-20    #d3d6e1  Navy 20% tint (very subtle tint backgrounds)
 * --pjd-navy-10    #e9eaf0  Navy 10% tint (near-white section backgrounds)
 * --pjd-oxblood    #800020  Oxblood (actions, CTAs)
 * --pjd-gold       #c19a5f  Heritage Gold (accents, prices)
 * --pjd-blush      #F5E6E9  Soft pink (gallery/image placeholder backgrounds)
 * --pjd-pale-blue  #E8EDF5  Pale blue (thumbnail strip backgrounds)
 * --pjd-grey-1     #f5f5f5  Page background / card backgrounds
 * --pjd-grey-2     #e0e0e0  Borders
 * --pjd-grey-3     #757575  Secondary text
 * --pjd-text       #212121  Body text
 * --pjd-white      #ffffff
 *
 * @package PJD_Directory
 */

/* ─── Custom properties ──────────────────────────────────────────────────── */

:root {
    --pjd-navy:      #051435;
    --pjd-navy-20:   #d3d6e1;  /* 20% navy — borders on white */
    --pjd-navy-10:   #e9eaf0;  /* 10% navy — hover backgrounds */
    --pjd-navy-5:    #f4f5f9;  /* 5% navy — section backgrounds */
    --pjd-oxblood:   #800020;
    --pjd-gold:      #c19a5f;
    --pjd-blush:     #F5E6E9;  /* Soft pink — gallery/image backgrounds */
    --pjd-pale-blue: #E8EDF5;  /* Pale blue — thumbnail strip backgrounds */
    --pjd-grey-1:    #f5f5f5;
    --pjd-grey-2:    #e0e0e0;
    --pjd-grey-3:    #757575;
    --pjd-text:      #212121;
    --pjd-white:     #ffffff;
    --pjd-radius:    6px;
    --pjd-shadow:    0 2px 8px rgba(0, 0, 0, 0.10);
    --pjd-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ─── Search form ────────────────────────────────────────────────────────── */

.pjd-search {
    background: var(--pjd-white);
    padding: 28px 20px;
    border-top: 4px solid var(--pjd-navy);
    box-shadow: 0 2px 12px rgba(5, 20, 53, 0.08);
}

.pjd-search__inner {
    max-width: 960px;
    margin: 0 auto;
}

.pjd-search__heading {
    color: var(--pjd-navy);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 16px;
}

.pjd-search__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.pjd-search__location-wrap {
    position: relative;
    flex: 1 1 260px;
}

.pjd-search__input {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    border: 1.5px solid var(--pjd-navy-20);
    border-radius: var(--pjd-radius);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
    color: var(--pjd-text);
    background: var(--pjd-white);
}

.pjd-search__input:focus {
    border-color: var(--pjd-navy);
    box-shadow: 0 0 0 3px rgba(5, 20, 53, 0.1);
}

.pjd-search__near-me {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pjd-grey-3);
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.pjd-search__near-me:hover {
    color: var(--pjd-navy);
}

.pjd-search__near-me svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Autocomplete dropdown */

.pjd-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--pjd-white);
    border: 1px solid var(--pjd-grey-2);
    border-radius: var(--pjd-radius);
    box-shadow: var(--pjd-shadow-lg);
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pjd-autocomplete__item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--pjd-text);
    transition: background 0.1s;
}

.pjd-autocomplete__item:hover,
.pjd-autocomplete__item--active {
    background: var(--pjd-grey-1);
}

/* Filter row */

.pjd-search__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.pjd-search__select,
.pjd-search__check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pjd-white);
    border: 1.5px solid var(--pjd-navy-20);
    border-radius: var(--pjd-radius);
    padding: 6px 12px;
    color: var(--pjd-navy);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pjd-search__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23051435'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.pjd-search__check-label:hover,
.pjd-search__select:hover {
    background: var(--pjd-navy-10);
    border-color: var(--pjd-navy);
}

.pjd-search__check-label input[type="checkbox"] {
    accent-color: var(--pjd-navy);
    width: 15px;
    height: 15px;
}

.pjd-search__btn {
    padding: 10px 24px;
    background: var(--pjd-oxblood);
    color: var(--pjd-white);
    border: none;
    border-radius: var(--pjd-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

.pjd-search__btn:hover {
    background: #600018;
}

/* ─── Results layout ─────────────────────────────────────────────────────── */

.pjd-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 900px) {
    .pjd-results {
        grid-template-columns: minmax(360px, 420px) 1fr;
    }
}

/* ─── Card list ──────────────────────────────────────────────────────────── */

.pjd-cards {
    background: var(--pjd-grey-1);
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.pjd-cards__meta {
    padding: 14px 16px 8px;
    font-size: 0.875rem;
    color: var(--pjd-grey-3);
    border-bottom: 1px solid var(--pjd-grey-2);
}

.pjd-cards__meta strong {
    color: var(--pjd-text);
}

.pjd-cards__list {
    padding: 12px 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 599px) {
    .pjd-cards__list {
        grid-template-columns: 1fr;
    }
}

/* ─── Property card ──────────────────────────────────────────────────────── */

.pjd-card {
    background: var(--pjd-white);
    border-radius: var(--pjd-radius);
    box-shadow: var(--pjd-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative; /* required for stretched link ::after */
}

.pjd-card:hover,
.pjd-card--hovered {
    box-shadow: var(--pjd-shadow-lg);
    transform: translateY(-2px);
}

/* Stretched link — the property name <a> expands to cover the whole card */
.pjd-card__link {
    color: inherit;
    text-decoration: none;
}

.pjd-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Location links and badge sit above the stretched link overlay */
.pjd-card__location-link,
.pjd-card__badge {
    position: relative;
    z-index: 2;
}

.pjd-card__image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--pjd-grey-2);
}

.pjd-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.pjd-card:hover .pjd-card__image {
    transform: scale(1.04);
}

/* Placeholder shown when no image is available */
.pjd-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--pjd-blush);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pjd-card__image-placeholder::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    opacity: 0.3;
    background: var(--pjd-navy);
    /* paw print mask — simple circle stand-in, overrideable */
    border-radius: 50%;
}

/* Coastal badge (used by archive cards) */
.pjd-card__badge--coastal {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(5, 20, 53, 0.85);
    color: var(--pjd-white);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
}

.pjd-card__body {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pjd-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pjd-text);
    margin: 0;
    line-height: 1.3;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pjd-card__location {
    font-size: 0.8rem;
    color: var(--pjd-grey-3);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pjd-card__location-link {
    color: inherit;
    text-decoration: none;
}

.pjd-card__location-link:hover {
    text-decoration: underline;
}

.pjd-card__specs {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--pjd-grey-3);
    margin-top: auto;
}

.pjd-card__spec {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pjd-card__spec svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}

.pjd-card__price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pjd-gold);
}

/* Amenity icon strip */

.pjd-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.pjd-amenity {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: var(--pjd-grey-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.pjd-amenity svg {
    width: 13px;
    height: 13px;
    fill: var(--pjd-navy);
}

/* Tooltip on amenity hover */

.pjd-amenity[data-label]:hover::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--pjd-text);
    color: var(--pjd-white);
    font-size: 0.7rem;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 10;
}

/* ─── Map container ──────────────────────────────────────────────────────── */

.pjd-map {
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    min-height: 400px;
    background: var(--pjd-grey-2);
}

/* Single-property map (property detail page) */

.pjd-map--single {
    position: relative;
    height: 340px;
    border-radius: var(--pjd-radius);
    overflow: hidden;
    box-shadow: var(--pjd-shadow);
    margin-bottom: 24px;
}

/* Leaflet overrides */

.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--pjd-radius);
    box-shadow: var(--pjd-shadow-lg);
}

.leaflet-popup-content {
    margin: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.pjd-popup__name {
    font-weight: 600;
    color: var(--pjd-text);
    margin-bottom: 4px;
}

.pjd-popup__price {
    color: var(--pjd-gold);
    font-weight: 700;
}

.pjd-popup__link {
    display: inline-block;
    margin-top: 6px;
    color: var(--pjd-navy);
    text-decoration: none;
    font-size: 0.8rem;
}

.pjd-popup__link:hover {
    text-decoration: underline;
}

/* Bouncing marker (card hover sync) */

@keyframes pjd-bounce {
    0%, 100% { transform: translateY(0);   }
    40%       { transform: translateY(-12px); }
    70%       { transform: translateY(-6px);  }
}

.pjd-marker-bounce {
    animation: pjd-bounce 0.6s ease;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */

.pjd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px 12px 20px;
}

.pjd-pagination__btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--pjd-grey-2);
    border-radius: var(--pjd-radius);
    background: var(--pjd-white);
    color: var(--pjd-text);
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.pjd-pagination__btn:hover {
    background: var(--pjd-grey-1);
    border-color: var(--pjd-navy);
}

.pjd-pagination__btn--active {
    background: var(--pjd-navy);
    border-color: var(--pjd-navy);
    color: var(--pjd-white);
    font-weight: 700;
    cursor: default;
}

.pjd-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Loading / empty states ─────────────────────────────────────────────── */

.pjd-cards--loading {
    opacity: 0.5;
    pointer-events: none;
}

.pjd-cards__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--pjd-grey-3);
}

.pjd-cards__empty p {
    margin: 0 0 8px;
    font-size: 1rem;
}

.pjd-cards__empty small {
    font-size: 0.875rem;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 899px) {
    .pjd-map {
        height: 300px;
        position: relative;
    }

    .pjd-cards {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 599px) {
    .pjd-search {
        padding: 20px 14px;
    }

    .pjd-search__btn {
        width: 100%;
        justify-content: center;
    }

    .pjd-search__filters {
        gap: 8px;
    }
}

/* ─── Property page — gallery ─────────────────────────────────────────────── */
/* Carousel styles are emitted inline by sc_pjd_gallery() (class-shortcodes.php)
   scoped to #pjd-gallery-{id}. No static rules needed here. */

/* ─── Property page — booking URL ────────────────────────────────────────── */

.pjd-property__book-url {
    margin: 8px 0 0;
    font-size: 0.85em;
    word-break: break-all;
}

.pjd-property__book-url a {
    color: inherit;
    opacity: 0.7;
    text-decoration: underline;
}

.pjd-property__book-url a:hover {
    opacity: 1;
}

/* ─── Sidebar search variant ─────────────────────────────────────────────── */

/* [pjd_search type="sidebar"] — location input + submit only, stacked. */
/* Inherits white background from the base .pjd-search rule; top border accent is retained. */

.pjd-search--sidebar {
    padding: 16px !important;
}

.pjd-search--sidebar .pjd-search__inner {
    max-width: none !important;
    margin: 0 !important;
}

.pjd-search--sidebar .pjd-search__row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
}

.pjd-search--sidebar .pjd-search__location-wrap {
    flex: 0 0 auto !important;
    width: 100% !important;
}

.pjd-search--sidebar .pjd-search__input {
    padding-right: 40px !important;
}

.pjd-search--sidebar .pjd-search__btn {
    width: 100%;
}

.pjd-search--sidebar .pjd-search__filters {
    display: none;
}

/* ─── Simple search variant ──────────────────────────────────────────────── */

/* [pjd_search type="simple"] — transparent wrapper, input + button in a navy row.
   Intended for embedding in hero/dark sections. */

.pjd-search--simple {
    background: transparent;
    padding: 8px 0;
    border-top: none;
    box-shadow: none;
}

.pjd-search--simple .pjd-search__row {
    background: var(--pjd-navy);
    border-radius: var(--pjd-radius);
    padding: 8px 10px;
    flex-wrap: nowrap;
}

/* On the navy row the input should blend in with white text */
.pjd-search--simple .pjd-search__input {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: var(--pjd-white);
}

.pjd-search--simple .pjd-search__input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.pjd-search--simple .pjd-search__input:focus {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.pjd-search--simple .pjd-search__near-me {
    color: rgba(255, 255, 255, 0.7);
}

.pjd-search--simple .pjd-search__near-me:hover {
    color: var(--pjd-white);
}

.pjd-search--simple .pjd-search__location-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 480px) {
    .pjd-search--simple .pjd-search__row {
        flex-direction: column;
        padding: 10px;
    }

    .pjd-search--simple .pjd-search__btn {
        width: 100%;
    }
}

/* [pjd_search type="home"] — homepage hero search bar.
   Completely transparent wrapper; Divi code block provides background and spacing.
   Input and button are taller and more prominent. No near-me button. */

.pjd-search--home {
    background: transparent;
    padding: 0;
    border-top: none;
    box-shadow: none;
}

.pjd-search--home .pjd-search__inner {
    max-width: 680px;
    margin: 0 auto;
}

.pjd-search--home .pjd-search__row {
    background: transparent;
    gap: 0;
    flex-wrap: nowrap;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
}

.pjd-search--home .pjd-search__location-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.pjd-search--home .pjd-search__input {
    height: 54px;
    padding: 0 20px;
    font-size: 1rem;
    font-family: var(--pjd-font-body);
    border: none;
    border-radius: 0;
    background: #ffffff;
    color: var(--pjd-charcoal);
    box-shadow: none;
}

.pjd-search--home .pjd-search__input::placeholder {
    color: #999;
    font-style: italic;
}

.pjd-search--home .pjd-search__input:focus {
    border-color: transparent;
    box-shadow: inset 0 0 0 2px var(--pjd-oxblood);
    outline: none;
}

.pjd-search--home .pjd-search__btn {
    height: 54px;
    padding: 0 36px;
    font-size: 1rem;
    font-family: var(--pjd-font-body);
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 0;
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .pjd-search--home .pjd-search__row {
        flex-direction: column;
        border-radius: var(--pjd-radius);
        overflow: visible;
        box-shadow: none;
    }

    .pjd-search--home .pjd-search__input {
        height: 48px;
        border-radius: var(--pjd-radius);
        border: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    }

    .pjd-search--home .pjd-search__btn {
        height: 48px;
        border-radius: var(--pjd-radius);
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* ─── Location taxonomy links ────────────────────────────────────────────── */
/* [pjd_location] outputs bare <a> tags (no class) — styled by theme/Divi.
   [pjd_county], [pjd_country], and archive cards retain their own classes. */

.pjd-county__link,
.pjd-country__link,
.pjd-card__location-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--pjd-navy-20);
    transition: border-color 0.15s, color 0.15s;
}

.pjd-county__link:hover,
.pjd-country__link:hover,
.pjd-card__location-link:hover {
    color: var(--pjd-navy);
    border-bottom-color: var(--pjd-navy);
}

/* ─── Property card — badges ─────────────────────────────────────────────── */

.pjd-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
    line-height: 1.4;
}

.pjd-card__badge--coastal {
    background: rgba(5, 20, 53, 0.85);
    color: var(--pjd-white);
}

/* ─── Book Now button ────────────────────────────────────────────────────── */
/* style="button" (default) — oxblood CTA. colour="#hex" on the shortcode
   applies an inline background-color that overrides the CSS default.
   style="link" outputs a bare <a> with no class — no CSS needed here.      */

.pjd-book-now-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--pjd-oxblood);
    color: var(--pjd-white);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--pjd-radius);
    border: 2px solid transparent;
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
    cursor: pointer;
    white-space: nowrap;
}

.pjd-book-now-btn:hover {
    background: #600018;
    transform: translateY(-1px);
    color: var(--pjd-white);
    text-decoration: none;
}

.pjd-book-now-btn:active {
    transform: translateY(0);
}

/* style="info" — blush background, navy border and text. Lower-weight CTA. */

.pjd-book-now-btn--info {
    background: var(--pjd-blush);
    color: var(--pjd-navy);
    border-color: var(--pjd-navy);
}

.pjd-book-now-btn--info:hover {
    background: #ecd0d6;  /* slightly deeper blush on hover */
    color: var(--pjd-navy);
    border-color: var(--pjd-navy);
    transform: translateY(-1px);
}

/* ─── Panel utility ──────────────────────────────────────────────────────── */
/* Left-border panel pattern — shared by stations, coastal, and similar blocks. */

.pjd-panel {
    margin: 20px 0;
    padding: 16px 20px;
    background: var(--pjd-pale-blue);
    border-radius: var(--pjd-radius);
    border-left: 3px solid var(--pjd-navy);
}

/* ─── Nearby rail stations ───────────────────────────────────────────────── */

.pjd-nearby-stations__heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pjd-navy);
    margin: 0 0 10px;
}

.pjd-nearby-stations__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pjd-nearby-stations__item {
    font-size: 0.9rem;
    color: var(--pjd-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pjd-nearby-stations__item a {
    color: var(--pjd-navy);
    text-decoration: none;
    font-weight: 500;
}

.pjd-nearby-stations__item a:hover {
    text-decoration: underline;
}

.pjd-nearby-stations__dist {
    color: var(--pjd-grey-3);
    font-size: 0.825rem;
}

/* ─── Coastal panel ──────────────────────────────────────────────────────── */
/* The PHP now adds .pjd-panel for the structural pattern; these rules handle
   the coastal-specific layout (icon + label in a row). */

.pjd-coastal-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--pjd-navy);
    font-weight: 500;
}

.pjd-coastal-panel__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--pjd-navy);
}

/* ─── National park panel ([pjd_national_park]) ──────────────────────────── */

.pjd-national-park-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--pjd-navy);
    font-weight: 500;
}

.pjd-national-park-panel__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--pjd-navy);
}

/* ─── Area panel ([pjd_area]) ────────────────────────────────────────────── */
/* Covers all listing_area types: National Parks, National Landscapes,
   AONBs, and notable regions. The icon colour deepens slightly from the
   coastal navy to give natural-landscape panels their own visual identity. */

.pjd-area-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--pjd-navy);
    font-weight: 500;
}

.pjd-area-panel__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--pjd-oxblood);
}

/* ─── Amenities combo box ([pjd_amenities]) ──────────────────────────────── */
/* Wrapper that groups all active amenity chips in a single flex-wrap row.
   The individual .pjd-amenity-item chips are styled below. */

.pjd-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

/* ─── Amenity items ──────────────────────────────────────────────────────── */

.pjd-amenity-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--pjd-text);
    padding: 4px 10px;
    background: var(--pjd-pale-blue);
    border-radius: var(--pjd-radius);
    border: 1px solid var(--pjd-navy-20);
}

.pjd-amenity-item svg {
    flex-shrink: 0;
    color: var(--pjd-navy);
}

.pjd-amenity-item__label {
    line-height: 1.3;
}

/* ─── Star rating ────────────────────────────────────────────────────────── */

.pjd-rating {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--pjd-gold);
    letter-spacing: 0.05em;
    line-height: 1;
}

/* ─── Description sections ───────────────────────────────────────────────── */

.pjd-description {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pjd-description__section {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pjd-grey-2);
}

.pjd-description__section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pjd-description__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pjd-navy);
    margin: 0 0 10px;
}

.pjd-description__body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--pjd-text);
}

.pjd-description__body p {
    margin: 0 0 0.75em;
}

.pjd-description__body p:last-child {
    margin-bottom: 0;
}

/* ─── [pjd_properties] curated grid ─────────────────────────────────────── */
/* !important on display and grid-template-columns is required to override    */
/* Divi's stylesheet which applies display: block / display: flex to div      */
/* descendants inside .et_pb_text_inner at higher specificity.                */

.pjd-properties {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
    margin: 24px 0;
}

/* Column count overrides — !important required for same Divi specificity reason */
.pjd-properties--cols-1 { grid-template-columns: 1fr !important; }
.pjd-properties--cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.pjd-properties--cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.pjd-properties--cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

@media (max-width: 1099px) {
    .pjd-properties--cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 899px) {
    .pjd-properties,
    .pjd-properties--cols-3,
    .pjd-properties--cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 599px) {
    .pjd-properties,
    .pjd-properties--cols-2,
    .pjd-properties--cols-3,
    .pjd-properties--cols-4 {
        grid-template-columns: 1fr !important;
    }
}

/* ─── Archive grid ───────────────────────────────────────────────────────── */

.pjd-archive {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
    margin: 24px 0;
}

@media (max-width: 899px) {
    .pjd-archive {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 599px) {
    .pjd-archive {
        grid-template-columns: 1fr !important;
    }
}

.pjd-archive__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--pjd-grey-3);
    padding: 40px 0;
}

/* Archive pagination (WordPress paginate_links output) */

.pjd-archive-pagination {
    margin: 32px 0 16px;
    display: flex;
    justify-content: center;
}

.pjd-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pjd-archive-pagination .page-numbers li a,
.pjd-archive-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--pjd-grey-2);
    border-radius: var(--pjd-radius);
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--pjd-text);
    background: var(--pjd-white);
    transition: background 0.15s, border-color 0.15s;
}

.pjd-archive-pagination .page-numbers li a:hover {
    background: var(--pjd-grey-1);
    border-color: var(--pjd-navy);
}

.pjd-archive-pagination .page-numbers li span.current {
    background: var(--pjd-navy);
    border-color: var(--pjd-navy);
    color: var(--pjd-white);
    font-weight: 700;
}


/* ─── Specs grid ([pjd_specs]) ───────────────────────────────────────────── */
/* Icon + number + label stacked vertically, displayed in a flex row.
   Typically shows sleeps / bedrooms / bathrooms on a property page. */

.pjd-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}

.pjd-specs__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
    padding: 12px 16px;
    background: var(--pjd-pale-blue);
    border-radius: var(--pjd-radius);
    border: 1px solid var(--pjd-navy-20);
    text-align: center;
}

.pjd-specs__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pjd-navy);
}

.pjd-specs__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pjd-navy);
    line-height: 1.1;
}

.pjd-specs__label {
    font-size: 0.75rem;
    color: var(--pjd-grey-3);
    text-transform: none;
}

/* ─── Price panel ([pjd_price_panel]) ────────────────────────────────────── */
/* Self-contained card for property listing pages. Gold left border anchors
   it to the brand palette without competing with the navy CTA buttons. */

.pjd-price-panel {
    margin: 20px 0;
    padding: 20px 24px;
    background: var(--pjd-white);
    border-left: 4px solid var(--pjd-gold);
    border-radius: var(--pjd-radius);
    box-shadow: var(--pjd-shadow);
}

.pjd-price-panel__main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.pjd-price-panel__from {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pjd-grey-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: center;
}

.pjd-price-panel__price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pjd-navy);
    line-height: 1;
}

.pjd-price-panel__period {
    font-size: 0.85rem;
    color: var(--pjd-grey-3);
    align-self: flex-end;
    padding-bottom: 3px;
}

.pjd-price-panel__peak {
    font-size: 0.875rem;
    color: var(--pjd-grey-3);
    margin: 0 0 12px;
}

.pjd-price-panel__disclaimer {
    font-size: 0.775rem;
    color: var(--pjd-grey-3);
    font-style: italic;
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--pjd-grey-2);
    line-height: 1.5;
}

/* "Click here to check latest price" CTA — shown when a listing has no price.
   A line of text with a link, matching the look of the priced panel — never a
   button. On cards/popups it is plain text inside an already-clickable card. */

.pjd-price-cta,
.pjd-card__price--cta,
.pjd-popup__price--cta {
    font-weight: 600;
    color: var(--pjd-gold);
    text-decoration: underline;
}

.pjd-price-panel__cta {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.pjd-price-panel__cta a {
    color: var(--pjd-gold);
    text-decoration: underline;
}

.pjd-price-panel__cta a:hover {
    text-decoration: none;
}

/* Small inline disclaimer appended by [pjd_price_range disclaimer="1"] */

.pjd-price__disclaimer {
    display: block;
    font-size: 0.775rem;
    color: var(--pjd-grey-3);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.5;
}
