/* =========================================================
   บ้านเบญญาภา — Sales front-end styles (standalone, no build)
   Loaded directly in head.blade.php. NOT compiled by laravel-mix.
   All classes are prefixed .hs-* so the investment back-office
   is never affected (except the global Thai font, cosmetic).
   ========================================================= */

:root {
    --hs-bg: #FBFAF8;
    --hs-surface: #FFFFFF;
    --hs-ink: #1F2723;
    --hs-muted: #6B746F;
    --hs-line: #E7E4DE;
    --hs-brand: #2F6F5B;
    --hs-brand-dark: #245A49;
    --hs-amber-bg: #FBF0DA;
    --hs-amber-fg: #845209;
    --hs-ok-bg: #E4F1EA;
    --hs-ok-fg: #1F6B4E;
    --hs-radius: 14px;
    --hs-radius-sm: 9px;
    --hs-radius-lg: 22px;
    --hs-serif: 'Noto Serif Thai', 'Prompt', Georgia, serif;
    --hs-shadow: 0 1px 2px rgba(31,39,35,.04), 0 6px 20px rgba(31,39,35,.06);
    --hs-shadow-lift: 0 6px 14px rgba(31,39,35,.08), 0 18px 40px rgba(31,39,35,.10);
}

/* Font: Prompt (Thai/Latin, Google Fonts — loaded in head.blade.php) */
body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI",
        system-ui, "Noto Sans Thai", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Listing grid ---------- */
.hs-listing { background: var(--hs-bg); }

/* ---------- House card ---------- */
.hs-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--hs-surface);
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-radius);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: var(--hs-shadow);
}
.hs-card:hover { transform: translateY(-2px); box-shadow: var(--hs-shadow-lift); }
.hs-card:focus-within { outline: 2px solid var(--hs-brand); outline-offset: 2px; }

.hs-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--hs-line);
    overflow: hidden;
}
.hs-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-card__noimg {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #4A524D; font-size: .85rem; gap: .4rem;
}

.hs-card__body { padding: .7rem .8rem .85rem; display: flex; flex-direction: column; gap: .35rem; }
.hs-price { color: var(--hs-brand); font-weight: 700; font-size: 1.18rem; line-height: 1.2; }
.hs-price small { color: var(--hs-muted); font-weight: 400; font-size: .72rem; }
.hs-addr {
    color: var(--hs-ink); font-size: .85rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hs-meta {
    display: flex; flex-wrap: wrap; gap: .1rem .7rem;
    color: var(--hs-muted); font-size: .8rem;
}
.hs-meta span { white-space: nowrap; }
.hs-code { color: var(--hs-muted); font-size: .68rem; letter-spacing: .01em; }

/* whole-card link */
.hs-stretch::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
}

/* ---------- Status badge ---------- */
.hs-badge {
    position: absolute; top: .55rem; left: .55rem; z-index: 2;
    display: inline-flex; align-items: center;
    padding: .18rem .6rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.hs-badge--ok { background: var(--hs-ok-bg); color: var(--hs-ok-fg); }
.hs-badge--reserve { background: var(--hs-amber-bg); color: var(--hs-amber-fg); }
.hs-badge--inline { position: static; box-shadow: none; }

/* ---------- CTA buttons ---------- */
.hs-cta { display: flex; flex-wrap: wrap; gap: .5rem; }
.hs-cta--fill .hs-btn { flex: 1 1 0; }
.hs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; padding: .5rem 1.1rem;
    border-radius: 999px; font-weight: 600; font-size: .95rem;
    text-decoration: none; border: 1.5px solid transparent;
    transition: filter .12s ease, background .12s ease, color .12s ease;
}
.hs-btn i { font-size: 1.1em; }
.hs-btn--line { background: #06C755; color: #fff; }
.hs-btn--line:hover { filter: brightness(.94); color: #fff; }
.hs-btn--phone { background: var(--hs-brand); color: #fff; }
.hs-btn--phone:hover { background: var(--hs-brand-dark); color: #fff; }
.hs-btn--fb { background: #fff; color: #1461C0; border-color: #1461C0; }
.hs-btn--fb:hover { background: #1461C0; color: #fff; }
.hs-btn:focus-visible { outline: 2px solid var(--hs-brand); outline-offset: 2px; }

/* ---------- Sticky mobile contact bar (detail page) ---------- */
.hs-stickybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: flex; gap: .5rem; padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--hs-line);
    box-shadow: 0 -4px 18px rgba(31,39,35,.08);
}
.hs-stickybar .hs-btn { flex: 1 1 0; min-height: 46px; }
@media (min-width: 768px) { .hs-stickybar { display: none; } }
/* give mobile pages room so the bar never covers content */
@media (max-width: 767.98px) { .hs-has-stickybar { padding-bottom: 84px; } }

/* ---------- Hero / section ---------- */
.hs-hero { padding: 1.4rem 0 .6rem; }
.hs-hero h1 { font-weight: 700; color: var(--hs-ink); font-size: clamp(1.5rem, 4vw, 2.2rem); }
.hs-hero p { color: var(--hs-muted); }
.hs-sectiontitle { font-weight: 700; color: var(--hs-ink); font-size: 1.15rem; }
.hs-sectiontitle small { color: var(--hs-muted); font-weight: 400; font-size: .82rem; }

/* ---------- Photo gallery (detail page) ---------- */
.hs-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}
@media (min-width: 768px) { .hs-gallery { grid-template-columns: repeat(3, 1fr); gap: .6rem; } }
.hs-gallery__item {
    display: block; position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--hs-radius-sm);
    overflow: hidden;
    background: var(--hs-line);
}
.hs-gallery__item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .25s ease;
}
.hs-gallery__item:hover img { transform: scale(1.04); }
.hs-gallery__item--lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.hs-gallery__item { cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.hs-lb {
    position: fixed; inset: 0; z-index: 2000; display: none;
    align-items: center; justify-content: center;
    background: rgba(15,20,17,.93);
}
.hs-lb.is-open { display: flex; }
.hs-lb__stage {
    margin: 0; max-width: 94vw; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center; gap: .7rem;
}
.hs-lb__stage img {
    max-width: 94vw; max-height: 82vh; object-fit: contain;
    border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
    opacity: 0; transition: opacity .2s ease;
}
.hs-lb__stage img.is-ready { opacity: 1; }
.hs-lb__count { color: rgba(255,255,255,.82); font-size: .9rem; letter-spacing: .02em; }
.hs-lb__btn {
    position: absolute; background: rgba(255,255,255,.14); color: #fff; border: none;
    width: 48px; height: 48px; border-radius: 50%; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s ease;
}
.hs-lb__btn:hover { background: rgba(255,255,255,.28); }
.hs-lb__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hs-lb__close { top: 16px; right: 16px; font-size: 2rem; }
.hs-lb__prev { left: 14px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.hs-lb__next { right: 14px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.hs-lb__spin {
    position: absolute; width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
    animation: hs-lb-spin .7s linear infinite; opacity: 0; pointer-events: none;
}
.hs-lb.is-loading .hs-lb__spin { opacity: 1; }
@keyframes hs-lb-spin { to { transform: rotate(360deg); } }
@media (max-width: 575.98px) {
    .hs-lb__prev { left: 6px; } .hs-lb__next { right: 6px; }
    .hs-lb__btn { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .hs-lb__stage img { transition: none; }
    .hs-lb__spin { animation: none; }
}

/* ---------- Filter bar ---------- */
.hs-filter {
    background: var(--hs-surface); border: 1px solid var(--hs-line);
    border-radius: var(--hs-radius); padding: .8rem; box-shadow: var(--hs-shadow);
}
.hs-filter label { font-size: .78rem; color: var(--hs-muted); margin-bottom: .15rem; }
.hs-filter .form-control, .hs-filter .form-select { border-radius: var(--hs-radius-sm); }
.hs-filterbtn {
    border: 1px solid var(--hs-line); border-radius: 999px;
    background: var(--hs-surface); color: var(--hs-ink); font-weight: 600;
    min-height: 44px; padding: .4rem 1.1rem;
}
@media (max-width: 767.98px) {
    .hs-filter .form-control, .hs-filter .form-select, .hs-filter .btn { min-height: 44px; }
}

/* ---------- Sold state ---------- */
.hs-badge--sold { background: #EFECE7; color: #5C554F; }
.hs-card--sold .hs-card__media img { filter: grayscale(.6); opacity: .72; }
.hs-card--sold .hs-price { color: var(--hs-muted); font-weight: 600; }

/* ---------- Section titles / detail typography ---------- */
.hs-secttitle { font-weight: 700; font-size: 1rem; color: var(--hs-ink); margin: 1rem 0 .1rem; }
.hs-has-stickybar pre {
    font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere;
    margin: 0; line-height: 1.6; font-size: 1rem;
}

/* ---------- Shared header ---------- */
.hs-header { background: var(--hs-surface); border-bottom: 1px solid var(--hs-line); }
.hs-header span { font-weight: 600; color: var(--hs-ink); font-size: 1.05rem; }

/* ---------- Landing display type ---------- */
.hs-serif { font-family: var(--hs-serif); }
.hs-display {
    font-family: var(--hs-serif); font-weight: 600; color: var(--hs-ink);
    font-size: clamp(1.9rem, 6vw, 3.1rem); line-height: 1.18; letter-spacing: -0.01em;
}
.hs-lead { font-size: clamp(1rem, 4.5vw, 1.22rem); color: var(--hs-muted); }
.hs-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--hs-brand);
}
.hs-eyebrow::before {
    content: ""; width: 26px; height: 2px; background: var(--hs-brand); border-radius: 2px;
}

/* ---------- Landing: hero ---------- */
.hs-lp { background: var(--hs-bg); }
.hs-lp-hero { padding: 2rem 0 1rem; }
@media (min-width: 992px) { .hs-lp-hero { padding: 3.2rem 0 1.6rem; } }
.hs-lp-hero .hs-btn-lg {
    min-height: 52px; padding: .6rem 1.6rem; font-size: 1.05rem;
    background: var(--hs-brand); color: #fff; border-radius: 999px; font-weight: 600;
    display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
    transition: background .12s ease;
}
.hs-lp-hero .hs-btn-lg:hover { background: var(--hs-brand-dark); color: #fff; }
@media (max-width: 575.98px) {
    .hs-lp-hero .hs-btn-lg, .hs-lp-hero .hs-btn-ghost { flex: 1 1 100%; justify-content: center; }
}

/* editorial featured house (hero media) */
.hs-feature {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--hs-radius-lg); background: var(--hs-line);
    aspect-ratio: 4 / 3; box-shadow: var(--hs-shadow-lift); text-decoration: none;
}
.hs-feature img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.hs-feature:hover img { transform: scale(1.04); }
.hs-feature__scrim {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to top, rgba(16,22,19,.82) 0%, rgba(16,22,19,.28) 38%, rgba(16,22,19,0) 62%);
}
.hs-feature__tag {
    position: absolute; top: 1rem; left: 1rem; z-index: 2;
    background: rgba(255,255,255,.95); color: var(--hs-brand-dark);
    font-weight: 600; font-size: .82rem; padding: .3rem .8rem; border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.hs-feature__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.1rem 1.2rem; color: #fff; }
.hs-feature__price { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.hs-feature__price small { font-weight: 400; font-size: .8rem; opacity: .85; }
.hs-feature__addr {
    font-size: .9rem; opacity: .92; margin-top: .2rem;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.hs-feature__meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .82rem; opacity: .9; margin-top: .35rem; }

/* ---------- Landing: trust strip ---------- */
.hs-trust {
    display: grid; grid-template-columns: 1fr; gap: .8rem;
    background: var(--hs-surface); border: 1px solid var(--hs-line);
    border-radius: var(--hs-radius); padding: 1.1rem 1.2rem; box-shadow: var(--hs-shadow);
}
@media (min-width: 768px) { .hs-trust { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; padding: 1.4rem 1.6rem; } }
.hs-trust__item { display: flex; gap: .8rem; align-items: flex-start; }
.hs-trust__ic {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--hs-ok-bg); color: var(--hs-brand); font-size: 1.15rem;
}
.hs-trust__t { font-weight: 600; color: var(--hs-ink); line-height: 1.3; }
.hs-trust__d { font-size: .86rem; color: var(--hs-muted); line-height: 1.5; }

/* ---------- Landing: section head ---------- */
.hs-sec { padding: 2.2rem 0 .4rem; }
.hs-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.hs-sec__title { font-family: var(--hs-serif); font-weight: 600; color: var(--hs-ink); font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.2; margin: 0; }
.hs-viewall { white-space: nowrap; color: var(--hs-brand); font-weight: 600; text-decoration: none; }
.hs-viewall:hover { color: var(--hs-brand-dark); text-decoration: underline; }

/* ---------- Landing: proof gallery ---------- */
.hs-proof { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 576px) { .hs-proof { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .hs-proof { grid-template-columns: repeat(6, 1fr); gap: .7rem; } }
.hs-proof__item { aspect-ratio: 1 / 1; border-radius: var(--hs-radius-sm); overflow: hidden; background: var(--hs-line); }
.hs-proof__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hs-proof__item:hover img { transform: scale(1.05); }

/* ---------- Landing: agent-family band (quiet) ---------- */
.hs-agentband {
    background: var(--hs-surface); border: 1px solid var(--hs-line);
    border-radius: var(--hs-radius-lg); padding: 1.6rem; box-shadow: var(--hs-shadow);
}
@media (min-width: 768px) { .hs-agentband { padding: 2.2rem 2.4rem; } }
.hs-btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 46px;
    padding: .5rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none;
    border: 1.5px solid var(--hs-brand); color: var(--hs-brand); background: transparent;
    transition: background .12s ease, color .12s ease;
}
.hs-btn-ghost:hover { background: var(--hs-brand); color: #fff; }

/* ---------- Detail: sticky info panel ---------- */
.hs-panel {
    background: var(--hs-surface); border: 1px solid var(--hs-line);
    border-radius: var(--hs-radius); box-shadow: var(--hs-shadow); padding: 1.2rem 1.25rem 1.35rem;
}
@media (min-width: 992px) { .hs-panel--sticky { position: sticky; top: 88px; } }
.hs-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-bottom: .8rem; border-bottom: 1px solid var(--hs-line); margin-bottom: .6rem; }
.hs-panel__brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--hs-ink); }
.hs-panel__brand small { display: block; font-weight: 400; font-size: .74rem; color: var(--hs-muted); }
.hs-detail-secttitle {
    font-family: var(--hs-serif); font-weight: 600; font-size: 1.02rem; color: var(--hs-ink);
    margin: 1.1rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--hs-line);
}
.hs-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.hs-kv > :last-child { color: var(--hs-ink); font-weight: 500; text-align: right; }
.hs-kv > :first-child { color: var(--hs-muted); }

/* ---------- Pagination tap targets ---------- */
.hs-listing .pagination { gap: .35rem; flex-wrap: wrap; justify-content: center; }
.hs-listing .pagination .page-link {
    min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center; border-radius: 10px;
}

/* ---------- Footer (sales) ---------- */
.footer { background: var(--hs-surface); border-top: 1px solid var(--hs-line); color: var(--hs-muted); font-size: .85rem; }
