/*
 * Small front-end tweaks, every public page. Loaded by inc/belle-front.php.
 */

/* ── "Hot Deal" label badge (term slug hot-offer) ─────────────────────
 * Listing cards, search results, property page. Matched by the label's
 * link (/label/hot-offer/), not its term ID or name, so renaming the label
 * keeps the style. Overrides the per-label colour in Properties → Labels. */
a.hz-label[href*="/label/hot-offer"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 7px;
    background: #C2410C !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 2px 8px rgba(120, 30, 0, .35);
}
a.hz-label[href*="/label/hot-offer"]::before {
    content: "";
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 3.9-1.8 5.9-3.3 7.8C7.2 11.1 6 13 6 15.3A6 6 0 0 0 12 21.5a6 6 0 0 0 6-5.9c0-2.3-1.1-4-2.2-5.4.1 1.6-.5 3.1-1.8 3.7.4-3.9-.6-8.2-2-12.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 3.9-1.8 5.9-3.3 7.8C7.2 11.1 6 13 6 15.3A6 6 0 0 0 12 21.5a6 6 0 0 0 6-5.9c0-2.3-1.1-4-2.2-5.4.1 1.6-.5 3.1-1.8 3.7.4-3.9-.6-8.2-2-12.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.hz-label[href*="/label/hot-offer"]:hover,
a.hz-label[href*="/label/hot-offer"]:focus {
    background: #A3360A !important;
    color: #fff !important;
}

/* ── "New Listing" label badge (term slug new-listing) ────────────────
 * Green, bold, no icon, so it stands out and differs from the orange
 * Hot Deal badge. Matched by link like the one above. */
a.hz-label[href*="/label/new-listing"] {
    background: #15803D !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 2px 8px rgba(10, 70, 30, .35);
}
a.hz-label[href*="/label/new-listing"]:hover,
a.hz-label[href*="/label/new-listing"]:focus {
    background: #116632 !important;
    color: #fff !important;
}

/* ── Home card frame (Hot Deals grid, New Listings carousel) ──────────
 * Houzez card widgets with CSS class "belle-hot-deals" or "belle-cards" (set
 * in Elementor → Advanced). Those widgets have no card padding/radius
 * controls; 8px / 8px matches the old Handpicked cards. */
.belle-hot-deals .grid-view .item-wrap.item-wrap-no-frame, /* beats main.css ".grid-view .item-wrap.item-wrap-no-frame { padding: 0 }" */
.belle-cards .grid-view .item-wrap.item-wrap-no-frame {
    padding: 8px;
    border-radius: 8px;
}

/* ── Home "New Listings" carousel (Property Cards Carousel v7, class
 * "belle-new-listings") ────────────────────────────────────────────── */
/* Same height for every card in the row (direct track only, not the photo sliders inside cards). */
.belle-cards .houzez-properties-carousel-js > .slick-list > .slick-track { display: flex; }
.belle-cards .houzez-properties-carousel-js > .slick-list > .slick-track > .slick-slide { height: auto; }

/* Header row: "View all new listings →" then round ‹ › buttons, right-aligned. */
.belle-new-listings .property-carousel-buttons-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all {
    order: -1;
    margin-right: 8px;
    padding: 8px 4px;
    border: 0;
    background: none !important;
    font-size: 15px;
    font-weight: 600;
    color: var(--e-global-color-54c3f6d, #8E6D43);
}
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all::after { content: " →"; }
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all:hover,
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all:focus {
    color: var(--e-global-color-text, #3C3633);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--e-global-color-primary, #AA8656);
    border-radius: 50%;
    background: #fff !important;
    color: var(--e-global-color-54c3f6d, #8E6D43);
    font-size: 0; /* hides "Prev" / "Next"; screen readers still read it */
    transition: background-color .15s ease, color .15s ease;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow::before {
    content: "";
    display: block !important; /* Houzez hides the slick arrow ::before */
    width: 18px;
    height: 18px;
    opacity: 1;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-next::before { transform: scaleX(-1); }
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow:hover:not(.slick-disabled),
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow:focus-visible {
    background: var(--e-global-color-primary, #AA8656) !important;
    color: #fff;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow.slick-disabled { opacity: .35; cursor: default; }

/* ── Listing card buttons (Call / Email / WhatsApp) ───────────────────
 * With three buttons on a narrow card (4 per row: Hot Deals, Handpicked)
 * WhatsApp runs past the card edge. When the footer is too narrow for the
 * labels, show icons only. The words stay in the page (font-size 0), so
 * screen readers still announce each button. Wider cards are unchanged. */
.item-footer.items-btns-count-3 { container-type: inline-size; }
@container (max-width: 249px) { /* the three labels need ~236px */
    /* extra classes: must beat main.css ".item-wrap-v9 .item-buttons-wrap .btn-item { font-size: 14px }" */
    .item-wrap .item-footer.items-btns-count-3 .item-buttons-wrap .btn-item { font-size: 0; gap: 0; min-width: 0; }
    .item-wrap .item-footer.items-btns-count-3 .item-buttons-wrap .btn-item .houzez-icon { font-size: 18px; }
}

/* ── Home "Meet the team": three agent cards (Elementor container 4f328be) ──
 * Classes set in Elementor: belle-agents (section), belle-agents__head /
 * __eyebrow / __title / __lead, belle-agents__grid (cards), belle-agent (card),
 * belle-agent__photo (image widget), __body, __name, __role, __meta (icon list),
 * __bio, __actions, __btn, __btn--wa. Text, photos and links stay editable in
 * Elementor; layout and look are here. "Book a tour" links to #book-tour, which
 * opens the [belle_home_tour] popup (data-agent attribute = preferred agent). */
.belle-agents {
    --ba-gold: var(--e-global-color-primary, #AA8656);
    --ba-gold-deep: var(--e-global-color-54c3f6d, #8E6D43);
    --ba-gold-soft: #F4EDE2;
    --ba-ink: #3C3633;
    --ba-muted: #6F675F;
    --ba-line: #E7DDCD;
}

.belle-agents .belle-agents__head { text-align: center; align-items: center; }
.belle-agents .belle-agents__eyebrow .elementor-heading-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ba-gold-deep);
}
.belle-agents .belle-agents__eyebrow .elementor-heading-title::before,
.belle-agents .belle-agents__eyebrow .elementor-heading-title::after {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--ba-gold);
}
.belle-agents .belle-agents__title { margin-top: 12px; }
.belle-agents .belle-agents__title .elementor-heading-title {
    margin: 0;
    font-size: clamp(26px, 2.3vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    text-transform: none; /* the theme capitalises every h2 */
    color: var(--ba-ink);
    text-wrap: balance;
}
.belle-agents .belle-agents__lead { margin-top: 12px; max-width: 560px; }
.belle-agents .belle-agents__lead,
.belle-agents .belle-agents__lead p { margin-bottom: 0; font-size: 16px; line-height: 1.6; color: var(--ba-muted); }

/* Cards: 3 columns; a swipe row on tablets and phones */
.belle-agents .e-con.belle-agents__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}
.belle-agents .e-con.belle-agent {
    position: relative;
    display: flex;
    flex-direction: column;
    width: auto;
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid var(--ba-line);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(60, 54, 51, .05), 0 20px 40px -28px rgba(60, 54, 51, .35);
    overflow: hidden;
}

/* Photo: the demo photos have white backgrounds; multiply turns that into the
   warm tint behind it (real photos only get very slightly warmer). */
.belle-agents .belle-agent__photo {
    width: 100%;
    margin: 0;
    background: linear-gradient(160deg, #F7F1E8 0%, #EFE5D6 100%);
}
.belle-agents .belle-agent__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 0;
    mix-blend-mode: multiply;
}

.belle-agents .e-con.belle-agent__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.belle-agents .belle-agent__name .elementor-heading-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
    color: var(--ba-ink);
}
.belle-agents .belle-agent__role { margin-top: 4px; }
.belle-agents .belle-agent__role .elementor-heading-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    color: var(--ba-gold-deep);
}

.belle-agents .belle-agent__meta { margin-top: 14px; }
.belle-agents .belle-agent__meta .elementor-icon-list-items { display: grid; gap: 6px; margin: 0; padding: 0; }
.belle-agents .belle-agent__meta .elementor-icon-list-item { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 0; }
.belle-agents .belle-agent__meta .elementor-icon-list-item::after { display: none; }
.belle-agents .belle-agent__meta .elementor-icon-list-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: -1px;
    border-radius: 50%;
    background: var(--ba-gold-soft);
}
.belle-agents .belle-agent__meta .elementor-icon-list-icon i { font-size: 11px; color: var(--ba-gold-deep); }
.belle-agents .belle-agent__meta .elementor-icon-list-icon svg { width: 11px; height: 11px; fill: var(--ba-gold-deep); }
.belle-agents .belle-agent__meta .elementor-icon-list-text { padding: 0; font-size: 14px; line-height: 1.5; color: var(--ba-ink); }

.belle-agents .belle-agent__bio { margin-top: 14px; }
.belle-agents .belle-agent__bio,
.belle-agents .belle-agent__bio p { margin-bottom: 0; font-size: 15px; line-height: 1.6; color: var(--ba-muted); }

.belle-agents .e-con.belle-agent__actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
}
.belle-agents .belle-agent__btn { flex: 1 1 0; min-width: 0; margin: 0; }
.belle-agents .belle-agent__btn .elementor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--ba-gold);
    border-radius: 999px;
    background: var(--ba-gold) !important; /* Theme Options CSS forces a gradient on .elementor-button with !important */
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.belle-agents .belle-agent__btn .elementor-button:hover,
.belle-agents .belle-agent__btn .elementor-button:focus-visible {
    background: var(--ba-gold-deep) !important;
    border-color: var(--ba-gold-deep);
    color: #FFFFFF;
}
.belle-agents .belle-agent__btn .elementor-button:focus-visible { outline: 3px solid var(--ba-gold); outline-offset: 2px; }
.belle-agents .belle-agent__btn .elementor-button-content-wrapper { display: inline-flex; align-items: center; gap: 8px; }
.belle-agents .belle-agent__btn .elementor-button-icon { display: inline-flex; margin: 0; font-size: 18px; }
.belle-agents .belle-agent__btn .elementor-button-icon svg { width: 18px; height: 18px; fill: currentColor; }

.belle-agents .belle-agent__btn--wa { flex: 0 0 auto; }
.belle-agents .belle-agent__btn--wa .elementor-button {
    background: #FFFFFF !important;
    border-color: var(--ba-line);
    color: var(--ba-ink);
}
.belle-agents .belle-agent__btn--wa .elementor-button-icon { color: #25D366; }
.belle-agents .belle-agent__btn--wa .elementor-button:hover,
.belle-agents .belle-agent__btn--wa .elementor-button:focus-visible {
    background: #F9F6F0 !important;
    border-color: #25D366;
    color: var(--ba-ink);
}

@media (max-width: 1024px) {
    /* Swipe row: the next card peeks in so people know there is more. */
    .belle-agents .e-con.belle-agents__grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: max(280px, 44%);
        gap: 16px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px; /* same 16px gutter as the other home blocks */
        padding: 4px 16px 18px;
        scrollbar-width: thin;
        scrollbar-color: #D9D1C5 transparent;
    }
    .belle-agents .e-con.belle-agent { scroll-snap-align: start; }
    .belle-agents .e-con.belle-agents__head { padding-inline: 16px; }
}
@media (max-width: 767.98px) {
    /* style.css hides 4f328be on phones with !important (written for the old
       value cards); the agent cards should show, so win on specificity. */
    .home .e-con.belle-agents { display: flex !important; }
    .belle-agents .e-con.belle-agents__grid { grid-auto-columns: 84%; }
    .belle-agents .belle-agents__eyebrow .elementor-heading-title { font-size: 12px; }
    .belle-agents .belle-agents__lead,
    .belle-agents .belle-agents__lead p { font-size: 15px; }
}

/* Sold out listings: censored price (inc/belle-sold-out.php). The digits are a dummy, never the real price. */
.belle-price-blur { display: inline-block; filter: blur(6px); user-select: none; -webkit-user-select: none; pointer-events: none; }
.belle-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
