/* ── Portsup — พอร์ตทรัพย์ · design v2 (2026-07-12) ── */
:root {
    --primary: #1a6b3c;
    --primary-dark: #145530;
    --primary-deep: #0c3822;          /* hero / footer drench */
    --primary-light: #e9f4ee;
    --accent: #c5a55a;
    --accent-dark: #a8893e;
    --accent-ink: #86691f;            /* gold ที่อ่านออกบนพื้นขาว */
    --ink: #16241c;                   /* heading */
    --text: #24332a;
    --text-light: #55655c;
    --bg: #f3f6f4;                    /* neutral เจือเขียว ไม่ใช่ครีม */
    --white: #ffffff;
    --border: #dfe7e2;
    --success: #10b981;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(18, 38, 27, .06), 0 1px 3px rgba(18, 38, 27, .05);
    --shadow-md: 0 3px 8px rgba(18, 38, 27, .08), 0 1px 3px rgba(18, 38, 27, .05);
    --shadow-lg: 0 16px 40px -12px rgba(18, 38, 27, .22);
    /* z-scale */
    --z-nav: 100; --z-navmenu: 200; --z-overlay: 1000; --z-toast: 1100;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', 'Noto Sans SC', system-ui, sans-serif;
    color: var(--text); background: var(--bg);
    font-size: 16px; line-height: 1.65;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { color: var(--ink); line-height: 1.35; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ── Navbar ── */
.navbar {
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0 clamp(1rem, 4vw, 2rem); height: 66px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: var(--z-nav);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 700; color: #2d2d2d; }
.navbar-brand span { color: var(--primary); }
.navbar-brand img.logo { height: 38px; width: auto; }
.admin-sidebar .logo img.logo { height: 32px; width: auto; }
.navbar-links { display: flex; gap: 1.35rem; align-items: center; }
.navbar-links a { color: var(--text); font-weight: 500; font-size: .95rem; transition: color .18s; }
.navbar-links a:hover { color: var(--primary); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: 10px; width: 44px; height: 44px; font-size: 1.15rem; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 22px; min-height: 44px; border-radius: 10px;
    font-weight: 600; font-size: .95rem; font-family: inherit;
    border: none; cursor: pointer; transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 16px -6px rgba(20, 85, 48, .5); }
.btn-accent { background: var(--accent); color: #26200c; }
.btn-accent:hover { background: #d3b56b; box-shadow: 0 6px 16px -6px rgba(168, 137, 62, .55); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 7px 14px; min-height: 38px; font-size: .85rem; border-radius: 9px; }
.btn-danger { background: var(--danger); color: var(--white); }

/* ── Hero (landing) ── */
.hero { background: var(--primary-deep); color: var(--white); padding: 4rem 2rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: .5rem; color: #fff; }
.hero p { font-size: 1.2rem; opacity: .9; margin-bottom: 2rem; }
.hero-search { max-width: 700px; margin: 0 auto; display: flex; gap: 8px; }
.hero-search select, .hero-search input { padding: 12px 16px; border: none; border-radius: 8px; font-size: 1rem; flex: 1; font-family: inherit; }
.hero-search button { padding: 12px 28px; }

/* landing hero v2 */
.hero-v2 {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1100px 480px at 85% -10%, rgba(197, 165, 90, .16), transparent 60%),
        radial-gradient(900px 520px at -10% 110%, rgba(16, 185, 129, .12), transparent 55%),
        linear-gradient(160deg, #11492b 0%, #0c3822 55%, #092b1a 100%);
    padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1.1rem, 4vw, 2.5rem) clamp(2.4rem, 5vw, 3.8rem);
}
.hero-v2::before {
    /* เส้น contour บางๆ แบบผังที่ดิน */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340' viewBox='0 0 340 340'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.2'%3E%3Cpath d='M20 300c60-90 40-150 110-190S280 60 320 20'/%3E%3Cpath d='M-10 260c80-70 60-130 130-170S290 30 340 -10'/%3E%3Cpath d='M50 340c50-100 20-170 90-210S270 90 310 50'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-v2-inner { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-v2 h1 { font-size: clamp(1.85rem, 4.2vw, 3.1rem); font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; color: #fff; margin-bottom: .7rem; }
.hero-v2 h1 em { font-style: normal; color: var(--accent); }
.hero-v2 .hero-sub { color: rgba(236, 245, 239, .82); font-size: clamp(.98rem, 1.6vw, 1.1rem); max-width: 34em; margin-bottom: 1.6rem; }
.hero-search-card {
    background: #fff; border-radius: 16px; padding: 10px;
    display: flex; gap: 8px; flex-wrap: wrap;
    box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .55);
}
.hero-search-card select, .hero-search-card input {
    border: none; background: var(--bg); border-radius: 10px; padding: 12px 13px;
    font-size: .93rem; font-family: inherit; color: var(--text); min-height: 46px;
}
.hero-search-card select { min-width: 108px; flex: 1; }
.hero-search-card input { flex: 2; min-width: 150px; }
.hero-search-card .btn { border-radius: 11px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 1.05rem; }
.hero-chips .chips-label { color: rgba(236, 245, 239, .6); font-size: .84rem; }
.hero-chip {
    background: rgba(255, 255, 255, .1); color: #eef5f0; border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px; padding: 8px 16px; min-height: 38px; display: inline-flex; align-items: center; gap: 6px;
    font-size: .84rem; transition: background .18s, border-color .18s;
}
.hero-chip:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); }
.hero-trust { display: flex; align-items: center; gap: .55rem; margin-top: 1.5rem; color: rgba(236, 245, 239, .75); font-size: .88rem; flex-wrap: wrap; }
.hero-trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* hero visual: การ์ดรูปทรัพย์จริงซ้อนกัน */
.hero-visual { position: relative; min-height: 380px; }
.hero-shot {
    position: absolute; border-radius: 14px; overflow: hidden;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 255, 255, .16);
    background: #133c27;
}
.hero-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shot-1 { width: 62%; aspect-ratio: 4 / 3; top: 4%; left: 0; transform: rotate(-2.2deg); z-index: 2; }
.hero-shot-2 { width: 56%; aspect-ratio: 4 / 3; top: 34%; right: 0; transform: rotate(1.8deg); z-index: 3; }
.hero-shot-3 { width: 46%; aspect-ratio: 4 / 3; bottom: 0; left: 8%; transform: rotate(-1deg); z-index: 1; opacity: .85; }
.hero-lead-pop {
    position: absolute; z-index: 4; right: 2%; top: 16%;
    background: #fff; color: var(--text); border-radius: 12px;
    padding: .6rem .85rem; display: flex; gap: .55rem; align-items: center;
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45); font-size: .8rem; line-height: 1.4;
}
.hero-lead-pop .pop-ic {
    width: 30px; height: 30px; border-radius: 50%; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-lead-pop strong { display: block; font-size: .82rem; color: var(--ink); }

/* ── Section ── */
.section { padding: clamp(2.2rem, 5vw, 3.5rem) clamp(1.1rem, 4vw, 2rem); max-width: 1200px; margin: 0 auto; }
.section-title { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: 0; }
.section-head .see-all { color: var(--primary); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.section-head .see-all:hover { text-decoration: underline; }
.section-kicker { color: var(--accent-ink); font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }

/* ── Property Cards ── */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.prop-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow);
    transition: transform .25s cubic-bezier(.22, .8, .35, 1), box-shadow .25s, border-color .25s;
    display: flex; flex-direction: column;
}
.prop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfdbd4; }
.prop-card-img { aspect-ratio: 4 / 3; background: #e6ece8; position: relative; overflow: hidden; }
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22, .8, .35, 1); }
.prop-card:hover .prop-card-img img { transform: scale(1.045); }
.prop-card-badge { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: var(--white); letter-spacing: .01em; }
.badge-sale { background: var(--primary); }
.badge-rent { background: #2563eb; }
.badge-hot { background: #d97706; }
.badge-both { background: linear-gradient(110deg, var(--primary) 0%, var(--primary) 48%, #2563eb 52%, #2563eb 100%); }
.prop-card-body { padding: 1.05rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.prop-card-price { font-size: 1.32rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.prop-card-price small { font-size: .8rem; color: var(--text-light); font-weight: 500; }
.prop-card-title { font-size: .95rem; margin: .35rem 0 .1rem; line-height: 1.5; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prop-card-meta { display: flex; gap: .9rem; color: var(--text-light); font-size: .84rem; margin-top: .5rem; flex-wrap: wrap; }
.prop-card-meta span { display: flex; align-items: center; gap: 5px; }
.prop-card-meta i { color: #8ba396; font-size: .8rem; }
.prop-card-location { font-size: .84rem; color: var(--text-light); margin-top: .25rem; }
.prop-card-location i { color: #8ba396; }
.prop-card-agent { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--text); }
.prop-card-agent { margin-top: .85rem; }
.prop-card-agent img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ── Agent Cards ── */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.agent-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center;
    transition: transform .25s cubic-bezier(.22, .8, .35, 1), box-shadow .25s;
    display: flex; flex-direction: column;
}
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.agent-card-cover { height: 86px; background: linear-gradient(135deg, var(--primary-deep), var(--primary)); background-size: cover; background-position: center; }
.agent-card-body { padding: 0 1.4rem 1.5rem; margin-top: -40px; display: flex; flex-direction: column; flex: 1; }
.agent-avatar {
    width: 80px; height: 80px; border-radius: 50%; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
    font-size: 2rem; color: var(--primary); font-weight: 700;
    border: 3px solid #fff; box-shadow: var(--shadow-md);
}
.agent-card h3 { font-size: 1.08rem; margin-bottom: .15rem; }
.agent-card .company { color: var(--text-light); font-size: .88rem; }
.agent-card .areas { margin-top: .5rem; font-size: .82rem; color: var(--text-light); }
.verified-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: .8rem; font-weight: 600; margin-top: .3rem; }
.agent-card .links { display: flex; justify-content: center; gap: .7rem; margin-top: 1.1rem; }

/* ── Broker Profile (embedded in marketplace) ── */
.broker-header { background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%); color: var(--white); padding: 3rem 2rem; }
.broker-header h1 { color: #fff; }
.broker-header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; }
.broker-avatar-lg { width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; flex-shrink: 0; border: 3px solid rgba(255,255,255,.4); }
.broker-info h1 { font-size: 1.8rem; margin-bottom: .3rem; }
.broker-info .company { opacity: .85; font-size: 1.1rem; }
.broker-info .bio { opacity: .8; margin-top: .5rem; max-width: 600px; }
.broker-contacts { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.broker-contacts a { background: rgba(255,255,255,.15); padding: 8px 16px; border-radius: 10px; font-size: .9rem; display: flex; align-items: center; gap: 6px; min-height: 40px; }
.broker-contacts a:hover { background: rgba(255,255,255,.25); }

/* ── Domain Demo Section ── */
.domain-demo { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); margin-bottom: 2rem; }
.domain-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.domain-level { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s; background: var(--white); }
.domain-level:hover { border-color: var(--primary); }
.domain-level.active { border-color: var(--primary); background: var(--primary-light); }
.domain-level h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.domain-level .level-badge { background: var(--primary); color: var(--white); padding: 2px 8px; border-radius: 4px; font-size: .75rem; }
.domain-level .level-badge.free { background: var(--success); }
.domain-level .level-badge.pro { background: var(--accent); color: #26200c; }
.domain-level .url-preview { background: #10241a; color: #7ee2ac; padding: 10px 14px; border-radius: 8px; font-family: ui-monospace, monospace; font-size: .88rem; margin: .8rem 0; word-break: break-all; }
.domain-level p { color: var(--text-light); font-size: .9rem; line-height: 1.55; }
.domain-level ul { margin-top: .5rem; padding-left: 1.2rem; color: var(--text-light); font-size: .85rem; }
.domain-level ul li { margin-bottom: .3rem; }

/* ── SaaS pitch (landing) ── */
.pitch { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.pitch-inner {
    max-width: 1200px; margin: 0 auto;
    padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1.1rem, 4vw, 2rem);
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.pitch h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.32; letter-spacing: -0.01em; margin-bottom: .8rem; }
.pitch h2 em { font-style: normal; color: var(--primary); }
.pitch-sub { color: var(--text-light); margin-bottom: 1.5rem; max-width: 36em; }
.pitch-list { list-style: none; display: grid; gap: .85rem; margin: 0 0 1.8rem; }
.pitch-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .97rem; }
.pitch-list li i { color: var(--primary); background: var(--primary-light); width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0; margin-top: .15rem; }
.pitch-list li strong { color: var(--ink); }
.pitch-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.pitch-visual { position: relative; display: flex; justify-content: center; }
.phone-frame {
    width: min(300px, 78vw); border-radius: 34px; padding: 10px;
    background: #10241a; box-shadow: 0 30px 70px -25px rgba(12, 56, 34, .55), 0 0 0 1px rgba(197, 165, 90, .35);
    position: relative; z-index: 1;
}
.phone-frame::before { content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 84px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .14); z-index: 2; }
.phone-frame img { border-radius: 25px; display: block; width: 100%; }
.pitch-visual::after {
    content: ''; position: absolute; inset: 12% -6% -8% 22%; z-index: 0; border-radius: 30px;
    background: radial-gradient(closest-side, rgba(197, 165, 90, .18), transparent);
}
.pitch-domain {
    position: absolute; z-index: 2; left: 0; bottom: 14%;
    background: #10241a; color: #7ee2ac; font-family: ui-monospace, monospace; font-size: .8rem;
    padding: .55rem .9rem; border-radius: 10px; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .4);
    display: flex; align-items: center; gap: .5rem;
}
.pitch-domain i { color: var(--accent); }

/* ── Admin ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: #16241c; color: var(--white); padding: 1.5rem 0; flex-shrink: 0; }
.admin-sidebar .logo { padding: 0 1.5rem; margin-bottom: 2rem; font-size: 1.2rem; font-weight: 700; }
.admin-sidebar .logo span { color: var(--accent); }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 1.5rem; color: rgba(255,255,255,.7); transition: all .2s; font-size: .95rem; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.1); color: var(--white); }
.admin-main { flex: 1; padding: 2rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.admin-header h1 { font-size: 1.5rem; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-card .number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-light); font-size: .9rem; margin-top: .2rem; }

/* Tables */
.table-wrap { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: #eef3f0; padding: 12px 16px; text-align: left; font-weight: 600; font-size: .82rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .03em; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; }
tr:hover td { background: #f7faf8; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.active { background: var(--success); }
.status-dot.pending { background: var(--accent); }
.status-dot.failed { background: var(--danger); }
.plan-badge { padding: 3px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.plan-free { background: #f3f4f6; color: #6b7280; }
.plan-starter { background: #dcfce7; color: #166534; }
.plan-pro { background: #fef9c3; color: #854d0e; }
.plan-pro_plus { background: #fce7f3; color: #9d174d; }
.plan-team { background: #d1fae5; color: #065f46; }

/* Forms */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .9rem; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea,
.input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
    font-size: .95rem; font-family: inherit; transition: border-color .2s, box-shadow .2s;
    background: var(--white); color: var(--text); min-height: 44px;
}
textarea.input { min-height: 0; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .input:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 107, 60, .13);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Property Detail ── */
.detail-hero { height: clamp(280px, 45vw, 440px); background: #0f1c15; position: relative; overflow: hidden; }
.detail-hero #heroImg { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.detail-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(24px) brightness(.5); transform: scale(1.12); z-index: 0; pointer-events: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.gallery-grid img:hover { transform: scale(1.04); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.js-zoom { cursor: zoom-in; }

/* Intro card (broker presentation) */
.intro-card { position: relative; overflow: hidden; max-width: 760px; margin: 0 auto; background: linear-gradient(135deg, var(--brand-grad-1, #1a3a2a) 0%, var(--brand-grad-2, #1a6b3c) 100%); color: #fff; border-radius: 18px; padding: 2.2rem 2.2rem 2rem; box-shadow: 0 10px 34px rgba(0,0,0,.22); }
.intro-card { border: 1px solid color-mix(in srgb, var(--accent, #c5a55a) 45%, transparent); }
.intro-card::before { content: '\201C'; position: absolute; top: 6px; left: 22px; font-family: Georgia, serif; font-size: 6rem; line-height: 1; color: var(--accent, #c5a55a); opacity: .22; pointer-events: none; }
.intro-card::after { content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent, #c5a55a) 30%, transparent), transparent 70%); pointer-events: none; }
.intro-card-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.3rem; position: relative; }
.intro-card-logo { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; background: #fff; padding: 5px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.intro-card-tagline { font-size: 1.45rem; line-height: 1.45; margin: 0; color: #fff; font-weight: 700; }
.intro-card-by { font-size: .9rem; opacity: .9; margin-top: .35rem; }
.intro-card-points { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .7rem; position: relative; }
.intro-card-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.02rem; line-height: 1.5; }
.intro-card-points li i { color: var(--accent, #c5a55a); margin-top: .28rem; flex-shrink: 0; font-size: .9rem; }
.intro-card-note { font-size: .92rem; opacity: .85; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--accent, #c5a55a) 35%, transparent); font-style: italic; position: relative; }
.intro-card-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.intro-btn { display: inline-flex; align-items: center; gap: .45rem; padding: 10px 18px; min-height: 44px; border-radius: 10px; font-size: .95rem; font-weight: 600; text-decoration: none; transition: transform .12s, opacity .12s; }
.intro-btn:hover { transform: translateY(-1px); opacity: .92; }
.intro-btn-primary { background: #fbd24a; color: #1a3a2a; }
.intro-btn-line { background: #06c755; color: #fff; }
.intro-btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
@media (max-width: 560px) {
    .intro-card { padding: 1.4rem 1.2rem; }
    .intro-card-head { flex-direction: column; text-align: center; gap: .7rem; }
    .intro-card-tagline { font-size: 1.15rem; }
    .intro-card-actions { justify-content: center; }
}

/* Lightbox */
.lb-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: var(--z-overlay); }
.lb-overlay.open { display: flex; }
.lb-overlay img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lb-btn { position: absolute; color: #fff; background: rgba(255,255,255,.15); border: none; cursor: pointer; font-size: 1.4rem; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.lb-btn:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; background: rgba(0,0,0,.5); padding: 5px 14px; border-radius: 20px; }
@media (max-width: 600px) { .lb-prev { left: 6px; } .lb-next { right: 6px; } }

.detail-content { max-width: 1200px; margin: 0 auto; padding: 2rem clamp(1.1rem, 4vw, 2rem); display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.detail-main h1 { font-size: clamp(1.35rem, 2.6vw, 1.65rem); margin-bottom: .5rem; }
.detail-price { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; color: var(--primary); margin-bottom: 1rem; letter-spacing: -0.01em; }
.price-was { font-size: 1.05rem; color: var(--text-light); text-decoration: line-through; font-weight: 400; margin-right: .5rem; }
.price-off { display: inline-block; background: #e11d48; color: #fff; font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 6px; margin-left: .5rem; vertical-align: middle; }
.price-save { font-size: .85rem; color: #e11d48; font-weight: 600; margin-top: 2px; }
.prop-card-off { position: absolute; top: 12px; right: 12px; background: #e11d48; color: #fff; font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 6px; z-index: 2; }
.prop-card-was { font-size: .8rem; color: var(--text-light); text-decoration: line-through; font-weight: 400; }
.btn-broker-logo { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 2px; background: #fff; }
.avatar-img { padding: 0 !important; overflow: hidden; background: #fff !important; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.detail-specs { display: flex; gap: .6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.detail-specs .spec {
    display: flex; align-items: center; gap: 7px; color: var(--text);
    background: var(--white); border: 1px solid var(--border); border-radius: 10px;
    padding: .5rem .85rem; font-size: .9rem;
}
.detail-specs .spec i { color: var(--primary); }
.detail-specs .spec strong { color: var(--ink); }
.detail-highlights { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.detail-highlights span { background: var(--primary-light); color: var(--primary-dark); padding: 5px 13px; border-radius: 20px; font-size: .85rem; }
.detail-desc { line-height: 1.75; color: var(--text); max-width: 70ch; }
.detail-desc p { white-space: pre-line; }

.detail-sidebar { position: sticky; top: 82px; align-self: start; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.contact-card h3 { margin-bottom: 1rem; }
.contact-card .agent-info { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.contact-card .agent-info .avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; }
.contact-card .btn { width: 100%; justify-content: center; margin-bottom: .5rem; }

/* ── Filter bar (หน้า /properties) ── */
.filter-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1.4rem;
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-card select, .filter-card input {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    font-family: inherit; font-size: .9rem; color: var(--text); background: var(--bg);
    min-height: 44px;
}
.filter-card select:focus, .filter-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 107, 60, .13); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 1.6rem; }
.chip {
    background: var(--white); color: var(--primary-dark); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 15px; font-size: .84rem; min-height: 36px;
    display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--primary); background: var(--primary-light); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Footer ── */
.footer { background: var(--primary-deep); color: rgba(236, 245, 239, .72); padding: 2rem; text-align: center; font-size: .9rem; }
.footer a { color: var(--accent); }
.footer-v2 { background: var(--primary-deep); color: rgba(236, 245, 239, .72); font-size: .9rem; text-align: left; padding: 0; }
.footer-v2 .footer-grid {
    max-width: 1200px; margin: 0 auto;
    padding: clamp(2.2rem, 5vw, 3.2rem) clamp(1.1rem, 4vw, 2rem) 1.6rem;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-v2 .f-brand img { height: 40px; width: auto; border-radius: 8px; background: #fff; padding: 3px; }
.footer-v2 .f-brand p { margin-top: .8rem; max-width: 30em; line-height: 1.7; }
.footer-v2 h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; font-weight: 600; }
.footer-v2 ul { list-style: none; display: grid; gap: .5rem; }
.footer-v2 ul a { color: rgba(236, 245, 239, .72); transition: color .15s; }
.footer-v2 ul a:hover { color: #fff; }
.footer-v2 .f-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.1rem clamp(1.1rem, 4vw, 2rem); text-align: center; font-size: .82rem;
    color: rgba(236, 245, 239, .5);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-v2-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .pitch-inner { grid-template-columns: 1fr; }
    .pitch-visual { order: -1; }
    .footer-v2 .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-search { flex-direction: column; }
    .broker-header-inner { flex-direction: column; text-align: center; }
    .detail-content { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
    .form-row { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .domain-levels { grid-template-columns: 1fr; }
    .prop-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
    .nav-toggle { display: inline-flex; }
    .navbar-links {
        display: none !important;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: .15rem;
        background: var(--white); border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 32px rgba(15, 23, 42, .14);
        padding: .5rem 1.25rem 1rem; z-index: var(--z-navmenu);
    }
    .navbar-links.open { display: flex !important; }
    .navbar-links > a { display: block; padding: 13px 8px; border-radius: 8px; border-bottom: 1px solid var(--border); }
    .navbar-links > a:last-of-type { border-bottom: none; }
    .navbar-links > a:hover { background: var(--primary-light); }
    .navbar-links .btn { justify-content: center; margin-top: .5rem; }
    .navbar-links .lang-switch { display: inline-flex; align-self: flex-start; margin-top: .5rem; }
}

/* ── ปุ่มสลับภาษา (TH/EN/中) ── */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: rgba(0,0,0,.05); border-radius: 999px; padding: 3px; vertical-align: middle; }
.lang-switch .lang-opt { font-size: .8rem; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; color: inherit; opacity: .65; text-decoration: none; transition: all .15s; }
.lang-switch .lang-opt:hover { opacity: 1; }
.lang-switch .lang-opt.active { background: var(--primary, #1a6b3c); color: #fff; opacity: 1; }
.navbar[style*="gradient"] .lang-switch { background: rgba(255,255,255,.18); }
@media (max-width: 640px) { .lang-switch .lang-opt { padding: 6px 8px; font-size: .75rem; } }

/* ── Motion safety ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
