/* Unit rows — the server-rendered card in components/unit-row.php, shown on the
 * home page, listing pages and palmera.php. Kept out of custom.css because
 * palmera.php has its own design system and does not load it; the colour
 * tokens it uses (--primary-color, --text-dark, …) come from whichever
 * stylesheet the page does load. No Bootstrap utilities, for the same reason. */

.units-list {
    padding: clamp(14px, 2.4vw, 24px);
    border-top: 1px solid #EDE8DB;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 16px;
}

.unit-listing-note {
    margin: 0;
    padding: 14px clamp(14px, 2.4vw, 24px) 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    border-top: 1px solid #F0EBDE;
}
.unit-listing-note a { font-weight: 700; }

/* Unit tile — used on the home page building cards and (as a .card) on the
   monthly-rentals page. */
.unit-card {
    background: #fff;
    border: 1px solid #EDE8DB;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, box-shadow .2s;
}
.unit-card.matched {
    border: 2px solid var(--primary-color);
    background: #EEF7F2;
    box-shadow: 0 12px 30px rgba(11, 130, 102, .20);
}

.unit-card__link { display: block; color: inherit; text-decoration: none; }
.unit-card__link:hover { color: inherit; }
.unit-card-head { display: flex; gap: 14px; padding: 14px; }
.unit-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.unit-name { font-weight: 700; color: var(--text-dark); font-size: 15.5px; }
.unit-title { font-size: 13px; color: #5B6462; line-height: 1.35; }
.unit-rent {
    font: 600 21px 'Cormorant Garamond', Georgia, serif;
    color: var(--primary-color);
    white-space: nowrap;
}
.unit-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    font-size: 13px;
    color: var(--text-body);
}
.unit-avail { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-color); font-weight: 600; font-size: 13px; }
.unit-avail.has-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    flex: none;
}

/* The all-in monthly figure where rent excludes utilities. Body colour, not
   muted: this is the number a tenant actually pays. */
.unit-allin { display: block; font-size: 13px; color: var(--text-mid); line-height: 1.35; }
.unit-allin strong { font-weight: 700; color: var(--text-dark); }
.unit-allin__math { color: var(--text-muted); }

.unit-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #EAF3EF;
    border-top: 1px solid #DCE9E3;
    color: var(--primary-deep);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: background .15s, color .15s;
}
.unit-card__link:hover .unit-card__cta { background: var(--primary-color); color: var(--bg-sand); }

.chev {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    flex: none;
}

/* The card photo links to the unit page; the zoom stays inside its corners. */
.unit-card__photo { display: block; overflow: hidden; cursor: pointer; }
.unit-card__photo img { transition: transform .45s ease; }
.unit-card__photo:hover img { transform: scale(1.04); }

/* Fixed size so every tile in a row is the same height whatever the photo. */
.unit-card__thumb {
    display: block;
    overflow: hidden;
    width: 76px;
    height: 76px;
    flex: none;
    border-radius: 11px;
    background: #DDE6E2;
}
.unit-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (prefers-reduced-motion: reduce) {
    .unit-card__photo img,
    .unit-card__photo:hover img { transition: none; transform: none; }
}

.unit-utilities {
    padding: 11px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-mid);
    border-top: 1px solid #E7F0EA;
    background: #F6FBF8;
}
.unit-utilities.included { color: var(--primary-deep); }
/* Inside a .card-body, which already pads — drop the strip's own chrome. */
.unit-utilities--inline { padding: 0 0 0.75rem; border-top: 0; background: none; }

.unit-card-actions {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    border-top: 1px solid #F0EBDE;
    margin-top: auto;
}

.unit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background .18s, border-color .18s;
}
.unit-btn-video {
    background: #fff;
    color: var(--primary-color);
    border: 1.5px solid #BFE0DD;
    padding: 11px;
    font-size: 13.5px;
    font-weight: 700;
}
.unit-btn-video:hover { background: #EAF6F4; border-color: var(--primary-color); }

.unit-btn-airbnb,
.unit-btn-apply,
.unit-btn-details {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 11px 8px;
}
/* Where you go to read more, not to book — outline rather than filled. */
.unit-btn-details { background: #fff; color: var(--primary-color); border: 1.5px solid var(--primary-color); }
.unit-btn-details:hover { background: #EAF6F4; }
.unit-btn-airbnb { background: #E0564B; color: #FFF6F3; }
.unit-btn-airbnb:hover { background: #CE4A40; color: #FFF6F3; }
.unit-btn-apply { background: var(--primary-color); color: var(--bg-sand); }
.unit-btn-apply:hover { background: var(--primary-dark); color: var(--bg-sand); }
.unit-btn-main { font-size: 13.5px; font-weight: 700; }
.unit-btn-sub { font-size: 11.5px; opacity: .9; }
.unit-btn-icon { font-size: 0.9rem; line-height: 1; }

.play-icon {
    position: relative;
    display: inline-flex;
    width: 15px;
    height: 11px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    margin-right: 6px;
}
.play-icon::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 1px;
    border-left: 6px solid currentColor;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
}

/* "Matches your search" — inline on wide screens, a full-width bar on phones. */
.unit-match-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.unit-match-bar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 9px 14px;
    background: var(--primary-color);
    color: var(--bg-sand);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
@media (max-width: 767.98px) {
    .unit-match-inline { display: none; }
    .unit-match-bar:not([hidden]) { display: flex; }
}

.unit-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.unit-check::after {
    content: '';
    width: 8px;
    height: 4px;
    border-left: 2px solid var(--bg-sand);
    border-bottom: 2px solid var(--bg-sand);
    transform: rotate(-45deg);
    margin-top: -2px;
}
.unit-check.light { background: rgba(244, 241, 232, .22); }

.unit-card__titlebar { display: flex; align-items: baseline; gap: .5rem; }
.unit-card__titlebar .unit-rent { margin-left: auto; }
.unit-card__buttons { display: flex; gap: .5rem; }
