* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f4f4;
    color: #111;
    min-height: 100vh;
}

/* ========================= NAV ========================= */
nav {
    background: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5e7;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
    color: #111;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    padding: 7px 14px;
    border-radius: 20px;
    transition: 0.2s;
}

.nav-links a:hover {
    background: #f0f0f0;
    color: #111;
}

.nav-links a.active {
    background: #111;
    color: white;
}

/* ========================= HERO ========================= */
.hero {
    text-align: center;
    padding: 50px 20px 30px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 15px;
    color: #666;
}

/* ========================= AREA FILTER BAR ========================= */
.area-filter-bar {
    background: white;
    padding: 10px 24px;
    border-bottom: 1px solid #f0f0f2;
    position: sticky;
    top: 0;
    z-index: 90;
}

.area-filter-wrap {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.area-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.area-filter-scroll::-webkit-scrollbar {
    display: none;
}

.area-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-size: 16px;
    color: #333;
    transition: all 0.2s;
    padding: 0;
}

.area-scroll-btn:hover {
    background: #1d1d1f;
    color: white;
    border-color: #1d1d1f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.area-scroll-btn.left {
    left: -8px;
}

.area-scroll-btn.right {
    right: -8px;
}

.area-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.area-fade-right,
.area-fade-left {
    position: absolute;
    top: 0;
    bottom: 4px;
    width: 50px;
    pointer-events: none;
    z-index: 3;
}

.area-fade-right {
    right: 0;
    background: linear-gradient(to right, transparent, white);
}

.area-fade-left {
    left: 0;
    background: linear-gradient(to left, transparent, white);
}

.area-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #6e6e73;
    border: 1px solid #d2d2d7;
    padding: 8px 16px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

.area-btn:hover {
    background: #f5f5f7;
    color: #1d1d1f;
    border-color: #c5c5c7;
}

.area-btn.active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
    font-weight: 500;
}

.area-btn .area-count {
    background: #f5f5f7;
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 980px;
    min-width: 20px;
    text-align: center;
    letter-spacing: 0;
}

.area-btn.active .area-count {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

/* ========================= FILTER + SORT BAR ========================= */
.filter-bar {
    background: white;
    padding: 12px 24px;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 89;
}

.filter-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.filter-btn {
    background: #f5f5f7;
    color: #555;
    border: 1px solid #e0e0e0;
    padding: 6px 16px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #eee;
    color: #111;
}

.filter-btn.active {
    background: #111;
    color: white;
    border-color: #111;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project-count {
    font-size: 13px;
    color: #888;
}

.sort-select {
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 13px;
    color: #333;
    background: white;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: #111;
}

/* ========================= PROJECT GRID ========================= */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 28px 24px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

/* ========================= CARD (Apple style) ========================= */
.card {
    background: white;
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(.25,.8,.25,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Scroll reveal animation --- */
.card {
    opacity: 0;
    transform: translateY(30px);
}

.card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(.25,.8,.25,1),
                transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.card.revealed:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card.selected {
    border: 2px solid #1d1d1f;
    box-shadow: 0 0 0 4px rgba(29,29,31,0.12), 0 12px 40px rgba(0,0,0,0.1);
}

.card.selected .card-img-tag-selected {
    display: flex;
}

/* --- Card Image --- */
.card-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f3, #e4e4e8);
}

.card-img-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shimmer 2.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.card-img-wrap.loaded::before {
    display: none;
}

.card-img-wrap.loaded .card-img-placeholder {
    display: none;
}

.card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #c7c7cc;
    z-index: 0;
}

.card-img-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.card-img-placeholder span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.card-img-wrap > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.card:hover .card-carousel img {
    transform: scale(1.05);
}

/* --- Image Carousel --- */
.card-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
}

.card-carousel img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.card-carousel-nav {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.card-carousel-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #1d1d1f;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.card-carousel-btn:hover {
    background: #1d1d1f;
    color: white;
}

.card-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
}

.card-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s;
}

.card-carousel-dot.active {
    background: white;
    width: 16px;
    border-radius: 3px;
}

.card-img-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 980px;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-img-tag-selected {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: #1d1d1f;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 980px;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
}

/* --- Card Body --- */
.card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.card-top-row h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.25;
    letter-spacing: -0.02em;
    flex: 1;
}

.card-title-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 980px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    margin-top: 4px;
}

.card-title-tag.freehold {
    background: #e8f5e9;
    color: #2e7d32;
}

.card-title-tag.leasehold {
    background: #fff3e0;
    color: #e65100;
}

.card-meta {
    font-size: 13px;
    color: #86868b;
    line-height: 1.5;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.card-meta .card-loc {
    color: #6e6e73;
}

/* --- Price Hero --- */
.card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f2;
}

.card-price {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.card-psf {
    font-size: 12px;
    color: #86868b;
    font-weight: 500;
}

/* --- Stats Row --- */
.card-stats {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.card-stat {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    border-right: 1px solid #f0f0f2;
}

.card-stat:last-child {
    border-right: none;
}

.card-stat:first-child {
    text-align: left;
    padding-left: 0;
}

.card-stat:last-child {
    text-align: right;
    padding-right: 0;
}

.card-stat-label {
    font-size: 10px;
    font-weight: 500;
    color: #aeaeb2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.card-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

/* --- Select Button --- */
.select-btn {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #1d1d1f;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.select-btn:hover {
    background: #424245;
}

.card.selected .select-btn {
    background: #1d1d1f;
}

/* Legacy card parts (kept for finder results) */
.img-box {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    background: #eee;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content p {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
    display: flex;
    align-items: center;
}

.card-content p .icon {
    display: inline-block;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* ========================= BOTTOM BAR ========================= */
.bottom-bar {
    text-align: center;
    padding: 20px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    position: sticky;
    bottom: 0;
}

.bottom-bar p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* ========================= BUTTONS ========================= */
button, .btn {
    background: #111;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #111;
    color: #111;
}

.btn-outline:hover {
    background: #111;
    color: white;
}

/* ========================= PAGE WRAPPER ========================= */
.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-title {
    text-align: center;
    font-size: 26px;
    margin-bottom: 8px;
}

.page-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 28px;
}

/* ========================= COMPARE ========================= */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 20px;
    margin-bottom: 30px;
}

.compare-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.compare-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.compare-card-body {
    padding: 18px;
}

.compare-card-body h2 {
    font-size: 20px;
    margin-bottom: 12px;
    min-height: 50px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.compare-table th {
    background: #111;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}

.compare-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr:nth-child(even) td {
    background: #fafafa;
}

.compare-table td:first-child {
    color: #888;
    font-size: 13px;
    width: 140px;
}

.compare-table td:first-child .icon {
    display: inline-block;
    width: 22px;
    text-align: center;
}

.vs {
    font-size: 22px;
    font-weight: bold;
    color: #bbb;
    text-align: center;
    padding-top: 80px;
}

/* ========================= DETAIL ========================= */
.detail-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto 24px;
}

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

.detail-card-body {
    padding: 24px;
}

.detail-card-body h2 {
    font-size: 24px;
    margin-bottom: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    color: #888;
}

.detail-row span:last-child {
    font-weight: 500;
}

/* ========================= FINDER ========================= */
.finder-form {
    background: white;
    border-radius: 16px;
    padding: 28px;
    max-width: 500px;
    margin: 0 auto 30px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.finder-form h3 {
    font-size: 18px;
    margin-bottom: 18px;
}

/* ========================= FORM ========================= */
.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #111;
}

/* ========================= RESULTS CARDS ========================= */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.result-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 2px solid #111;
}

.result-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.result-card-body {
    padding: 14px;
}

.result-card-body h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.result-card-body p {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

/* ========================= TAGS ========================= */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 980px;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.tag-freehold        { background: #dcfce7; color: #166534; }
.tag-near-mrt        { background: #dbeafe; color: #1e40af; }
.tag-low-density     { background: #fef3c7; color: #92400e; }
.tag-low-psf         { background: #e0e7ff; color: #3730a3; }
.tag-family-size     { background: #fce7f3; color: #9d174d; }
.tag-below-450k      { background: #d1fae5; color: #065f46; }
.tag-premium         { background: #fef9c3; color: #854d0e; }
.tag-ready-move-in   { background: #ccfbf1; color: #115e59; }
.tag-branded         { background: #f3e8ff; color: #6b21a8; }
.tag-default         { background: #f3f4f6; color: #374151; }

/* ========================= BACK LINKS ========================= */
.back-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-state p {
    font-size: 16px;
    margin-top: 10px;
}

/* ========================= FOOTER ========================= */
.site-footer {
    background: #1d1d1f;
    color: #86868b;
    text-align: center;
    padding: 28px 20px;
    font-size: 12px;
    line-height: 1.7;
    margin-top: 40px;
}

.site-footer .footer-brand {
    color: #f5f5f7;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.site-footer .footer-disclaimer {
    max-width: 600px;
    margin: 0 auto 8px;
}

.site-footer .footer-copy {
    color: #6e6e73;
    margin-top: 12px;
    border-top: 1px solid #2d2d2f;
    padding-top: 12px;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 640px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }
    .vs {
        padding-top: 0;
    }
    nav {
        flex-direction: column;
        gap: 10px;
    }
}
