:root {
    --bg: #f7f6f1;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --navy: #0f172a;
    --gold: #c6a46a;
    --gold-soft: #e8d6b6;
    --line: rgba(15, 23, 42, 0.08);
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Noto Sans Thai', Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(198, 164, 106, 0.12), transparent 22%),
        linear-gradient(180deg, #fbfaf6 0%, #f4f1ea 45%, #f8f6f2 100%);
    color: var(--text);
}

h1, h2, h3, .brand-text {
    font-family: 'Noto Sans Thai', Arial, sans-serif;
    letter-spacing: 0.2px;
}

a {
    color: #1d4ed8;
    text-decoration: none;
    transition: 0.2s ease;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 12px 28px rgba(198, 164, 106, 0.35);
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #e5e7eb;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 60px;
    color: #fff;
    background:
        linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.74)),
        url('https://images.unsplash.com/photo-1771366260867-7e07094579d7?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(198, 164, 106, 0.28), transparent 30%),
        radial-gradient(circle at right center, rgba(255, 255, 255, 0.08), transparent 26%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: center;
}

.hero-copy h1 {
    margin: 0 0 16px;
    max-width: 760px;
    font-size: 42px;
    line-height: 1.18;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    font-size: 18px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

.hero-kicker,
.showcase-kicker {
    display: inline-block;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.hero-points,
.showcase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-points span,
.showcase-list span {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.hero-photo-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    align-items: center;
    margin-top: 28px;
    padding: 14px;
    max-width: 560px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-photo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 18px;
}

.hero-photo-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.hero-photo-copy span {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.hero-panel {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
}

.search-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
}

.search-box input,
.search-box select,
.search-box textarea,
.admin-form input,
.admin-form select,
.admin-form textarea,
.lead-form input,
.lead-form textarea,
form input,
form select,
form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd6c7;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.search-box input:focus,
.search-box select:focus,
.search-box textarea:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.lead-form input:focus,
.lead-form textarea:focus,
form input:focus,
form select:focus,
form textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(198, 164, 106, 0.12);
}

.search-box button,
.admin-form button,
.lead-form button,
form button {
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #b68d4c, #d8be8c);
    box-shadow: 0 12px 24px rgba(182, 141, 76, 0.28);
    color: #0f172a;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.search-box button:hover,
.admin-form button:hover,
.lead-form button:hover,
form button:hover {
    transform: translateY(-1px);
}

.hero-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.hero-mini-stats div {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-mini-stats strong {
    display: block;
    font-size: 30px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 30px auto;
}

.stat-card,
.empty-box,
.content-box,
.table-card,
.admin-single,
.auth-box {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-card strong {
    color: #9a6f32;
    font-size: 34px;
}

.stat-card span {
    margin-top: 8px;
    color: var(--muted);
}

.feature-showcase {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 26px;
    align-items: center;
    margin: 22px auto 34px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.showcase-media img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 22px;
}

.showcase-copy h2 {
    margin: 0 0 14px;
    font-size: 40px;
    line-height: 1.2;
    color: #162033;
}

.showcase-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.showcase-kicker {
    border-color: rgba(182, 141, 76, 0.25);
    background: rgba(198, 164, 106, 0.12);
    color: #8a6835;
}

.showcase-list span {
    border-color: rgba(182, 141, 76, 0.18);
    background: rgba(198, 164, 106, 0.1);
    color: #6b5130;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 16px 0 24px;
}

.hero-banner-image {
    margin: 8px 0 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.hero-banner-image img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.sample-homes {
    margin-bottom: 28px;
}

.sample-home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.sample-home-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sample-home-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 72px rgba(15, 23, 42, 0.16);
}

.sample-home-card img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.sample-home-body {
    padding: 18px;
}

.sample-home-body h3 {
    margin: 10px 0 10px;
    font-size: 24px;
    line-height: 1.35;
    color: #172033;
}

.sample-home-body p {
    margin: 0;
    color: #5d667a;
    line-height: 1.8;
}

.section-head h2 {
    margin: 0;
    font-size: 36px;
    color: #162033;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.grid.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 72px rgba(15, 23, 42, 0.16);
}

.card img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card-body {
    padding: 18px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.35;
}

.card h3 a {
    color: #172033;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(198, 164, 106, 0.12);
    color: #8a6835;
    font-size: 12px;
    font-weight: 700;
}

.badge.hot {
    background: rgba(190, 24, 93, 0.12);
    color: #be185d;
}

.muted {
    color: var(--muted);
}

.price {
    margin: 12px 0;
    color: #111827;
    font-size: 30px;
    font-weight: 700;
}

.excerpt {
    min-height: 52px;
    color: #5d667a;
    line-height: 1.8;
}

.btn-secondary {
    display: inline-block;
    padding: 11px 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7efe1, #f3e3c2);
    color: #5f4623;
    font-weight: 700;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f4e6cb, #ecd7ac);
}

.property-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    padding: 30px 16px;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
}

.gallery img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
    background: #eee;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
}

.price-box {
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #6b5130);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.feature-grid div {
    padding: 16px;
    border: 1px solid #ece5d8;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.feature-grid strong {
    display: block;
    font-size: 22px;
}

.lead-form {
    display: grid;
    gap: 12px;
}

.alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.site-footer {
    margin-top: 40px;
    padding: 34px 0 24px;
    background:
        linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)),
        url('https://images.unsplash.com/photo-1757359056339-22968344cce6?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: #d1d5db;
    font-family: 'Noto Sans Thai', Arial, sans-serif;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.footer-wrap strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 22px;
}

.footer-wrap p {
    max-width: 480px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
}

.footer-copy {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

.line-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    padding: 14px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 16px 32px rgba(34, 197, 94, 0.28);
    color: #fff;
    font-weight: 700;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #f6efe5, #f3f4f6);
}

.auth-box {
    width: 100%;
    max-width: 420px;
}

.center {
    text-align: center;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(180deg, #0f172a, #1e293b);
}

.admin-sidebar h2,
.admin-sidebar a {
    color: #fff;
}

.admin-content {
    padding: 24px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-card {
    margin-top: 20px;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    color: #475569;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.admin-single {
    max-width: 980px;
    margin: 24px auto;
}

.admin-single.wide {
    max-width: 1200px;
}

.admin-form label {
    display: block;
    margin: 8px 0;
    color: #1e293b;
    font-weight: 700;
}

.admin-form textarea {
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.existing-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.image-box {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
}

.image-box img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 10px;
}

.owner-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.owner-contact-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
}

.owner-contact-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.owner-contact-value {
    color: var(--text);
    font-weight: 700;
    word-break: break-word;
}

@media (max-width: 992px) {
    .hero-grid,
    .property-wrap,
    .grid.cards,
    .sample-home-grid,
    .feature-grid,
    .grid-3,
    .grid-2,
    .existing-images,
    .stats,
    .hero-mini-stats,
    .footer-wrap,
    .feature-showcase {
        display: grid;
        grid-template-columns: 1fr;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .property-header,
    .nav-wrap,
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-copy h1 {
        font-size: 32px;
    }

    .section-head h2,
    .showcase-copy h2 {
        font-size: 30px;
    }

    .main-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 54px 0 44px;
    }

    .card img,
    .showcase-media img {
        height: 240px;
    }

    .brand-text {
        font-size: 18px;
    }

    .section-head {
        align-items: flex-start;
    }

    .hero-photo-card {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 27px;
        line-height: 1.28;
    }

    .hero-banner-image img {
        height: 240px;
    }
}
