:root {
    --red: #e21b1b;
    --dark-red: #bf000e;
    --text: #2d2d2d;
    --muted: #777;
    --border: #dedede;
    --soft: #f2f2f2;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button, input, select {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.top-header {
    background: #fff;
    border-bottom: 1px solid #dfdfdf;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
}

.brand-roof {
    width: 34px;
    height: 25px;
    display: inline-block;
    position: relative;
}

.brand-roof::before,
.brand-roof::after {
    content: "";
    position: absolute;
    background: var(--red);
    height: 8px;
    width: 25px;
    border-radius: 4px;
    top: 8px;
}

.brand-roof::before {
    transform: rotate(-40deg);
    left: 0;
}

.brand-roof::after {
    transform: rotate(40deg);
    right: 0;
}

.brand-roof.small {
    transform: scale(.75);
    transform-origin: left center;
}

.brand-text {
    line-height: .9;
    display: grid;
}

.brand-text b {
    font-size: 20px;
    letter-spacing: -1px;
}

.brand-text small {
    font-weight: 700;
    font-size: 12px;
    color: #555;
}

.main-nav {
    display: flex;
    gap: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--red);
}

.header-search {
    height: 36px;
    flex: 1;
    max-width: 420px;
    border: 1px solid #d8d8d8;
    display: flex;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
    color: #9a9a9a;
    background: #fff;
}

.header-search input {
    flex: 1;
    border: 0;
    outline: 0;
    height: 100%;
    font-size: 13px;
    padding: 0 6px;
}

.header-search span {
    padding-left: 10px;
    color: #4679ff;
}

.header-search button {
    width: 36px;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.round-btn {
    width: 54px;
    height: 38px;
    border-radius: 22px;
    border: 1px solid #ddd;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.round-btn span {
    font-size: 9px;
    line-height: 1;
}

.login-btn {
    font-weight: 700;
    font-size: 12px;
    color: #555;
    border: 1px solid #ddd;
    padding: 9px 12px;
    border-radius: 18px;
}

.post-btn {
    background: var(--red);
    color: white;
    font-weight: 700;
    border-radius: 20px;
    padding: 12px 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}

.hero {
    min-height: 245px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, #a9000d, #e31b25 55%, #b40013);
    color: white;
}

.hero-map {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.12), transparent 18%),
        radial-gradient(circle at 70% 15%, rgba(255,255,255,.09), transparent 22%),
        radial-gradient(circle at 42% 75%, rgba(255,255,255,.08), transparent 28%);
    opacity: .75;
}

.hero-content {
    position: relative;
    padding: 44px 0 28px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 24px;
    font-size: 25px;
    font-weight: 400;
}

.hero h1 strong {
    font-weight: 800;
}

.hero-search {
    width: 580px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.hero-search input {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 6px;
    padding: 0 16px;
    outline: 0;
    font-size: 14px;
}

.hero-search button,
.map-btn {
    height: 42px;
    border: 0;
    background: var(--red);
    color: white;
    border-radius: 6px;
    font-weight: 700;
    padding: 0 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.map-btn {
    background: #a90912;
}

.new-label {
    position: absolute;
    left: 0;
    top: -22px;
    background: var(--red);
    color: white;
    font-size: 11px;
    border-radius: 3px;
    padding: 4px 8px;
}

.popular-row {
    margin-top: 13px;
    font-size: 12px;
}

.popular-row span {
    font-weight: 700;
}

.popular-row a {
    margin-left: 8px;
}

.hero-chips {
    margin-top: 35px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-chips a {
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 18px;
    padding: 9px 16px;
    background: rgba(176, 0, 13, .55);
    font-size: 13px;
    font-weight: 700;
}

.page-grey {
    background: #f0f0f0;
    min-height: 700px;
    padding-bottom: 50px;
}

.breadcrumb {
    padding: 14px 0 6px;
    color: #777;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.list-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.list-head h1 {
    font-size: 16px;
    margin: 0;
    flex: 1;
}

.list-filters {
    display: flex;
    gap: 8px;
}

.list-filters input,
.list-filters select {
    height: 34px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 12px;
}

.list-filters button {
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    cursor: pointer;
}

.office-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    align-items: start;
}

.office-card {
    background: white;
    border: 1px solid var(--border);
    min-height: 430px;
    padding: 18px 15px;
    text-align: center;
    position: sticky;
    top: 72px;
}

.office-logo {
    width: 76px;
    height: 76px;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 1px solid #eee;
}

.office-card h2 {
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.office-card h2 span {
    color: #258be9;
}

.office-age {
    font-size: 12px;
    color: #777;
    margin: 8px 0;
}

.office-location {
    color: #666;
    font-size: 12px;
}

.red-wide {
    display: block;
    width: 100%;
    background: var(--red);
    color: white;
    border-radius: 4px;
    padding: 12px 10px;
    margin: 16px 0 12px;
    font-weight: 700;
    text-align: center;
}

.license-box {
    background: #f3f3f3;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    display: grid;
    gap: 5px;
}

.advisor {
    text-align: left;
    margin-top: 70px;
}

.advisor h3 {
    font-size: 13px;
    font-weight: 500;
}

.advisor div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.advisor img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.advisor b {
    font-size: 12px;
}

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

.listing-card {
    background: white;
    border: 1px solid var(--border);
    overflow: hidden;
}

.image-link {
    display: block;
    position: relative;
    height: 156px;
    overflow: hidden;
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease;
}

.listing-card:hover .image-link img {
    transform: scale(1.03);
}

.photo-count {
    position: absolute;
    left: 7px;
    bottom: 7px;
    background: rgba(255,255,255,.9);
    color: #555;
    border-radius: 3px;
    font-size: 10px;
    padding: 2px 5px;
}

.favorite,
.fav-mini {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: white;
    color: #999;
    border: 1px solid #ddd;
    font-size: 21px;
}

.listing-body {
    padding: 10px 12px 12px;
}

.price {
    display: block;
    color: #333;
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 4px;
}

.listing-body p {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 12px;
    min-height: 32px;
}

.listing-body small {
    color: #777;
    display: block;
    font-size: 11px;
    min-height: 28px;
}

.listing-body time {
    display: block;
    font-size: 11px;
    color: #777;
    margin: 6px 0 10px;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.card-actions a {
    border: 1px solid #ccc;
    padding: 7px 4px;
    border-radius: 3px;
    font-size: 10px;
    text-align: center;
    background: #fff;
}

.seo-links {
    background: #e8e8e8;
    margin-top: 36px;
    padding: 18px 24px;
    color: #555;
    font-size: 12px;
}

.seo-links h3 {
    margin-top: 0;
    font-size: 12px;
}

.seo-links a {
    color: #555;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.quick-actions article {
    background: white;
    border: 1px solid #e0e0e0;
    min-height: 92px;
    border-radius: 5px;
    padding: 19px 15px 15px 64px;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.quick-actions h3 {
    font-size: 15px;
    margin: 0 0 8px;
}

.quick-actions p {
    font-size: 12px;
    color: #555;
    margin: 0;
}

.quick-actions span {
    position: absolute;
    right: 13px;
    top: 11px;
    font-size: 10px;
    background: var(--red);
    color: white;
    border-radius: 3px;
    padding: 3px 5px;
}

.quick-icon {
    position: absolute;
    left: 18px;
    top: 23px;
    width: 36px;
    height: 36px;
    border: 1px solid #e4e4e4;
    color: var(--red);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.city-section,
.category-strip,
.listing-showcase,
.news-section {
    margin-top: 30px;
}

.city-section h2,
.category-strip h2,
.listing-showcase h2,
.news-section h2 {
    font-size: 18px;
    margin: 0 0 20px;
}

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

.city-grid a {
    height: 166px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.city-grid a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,.65));
}

.city-grid b,
.city-grid small {
    position: relative;
    z-index: 1;
}

.category-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: auto;
    background: white;
    border: 1px solid #ddd;
}

.category-table div {
    min-width: 210px;
    border-right: 1px solid #e2e2e2;
    padding: 18px 20px;
}

.category-table div:last-child {
    border-right: 0;
}

.category-table h3 {
    margin: 0 0 14px;
    font-size: 14px;
}

.category-table a {
    display: flex;
    justify-content: space-between;
    color: #555;
    padding: 8px 0;
    font-size: 12px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
}

.section-head a {
    color: var(--red);
    font-weight: 700;
    font-size: 12px;
}

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

.project-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

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

.project-card div {
    padding: 14px;
}

.project-card h3 {
    font-size: 15px;
    margin: 0 0 12px;
}

.project-card p,
.project-card small {
    color: #555;
    font-size: 12px;
    display: block;
    min-height: 28px;
}

.project-card strong {
    display: block;
    margin-top: 12px;
    font-size: 17px;
}

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

.news-grid article {
    background: white;
    border: 1px solid #ddd;
}

.news-grid img {
    height: 100px;
    width: 100%;
    object-fit: cover;
}

.news-grid h3 {
    font-size: 12px;
    padding: 9px;
    margin: 0;
}

.app-banner {
    margin-top: 34px;
    min-height: 190px;
    background: linear-gradient(135deg, #d71920, #b80712);
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 42px 54px 0;
    overflow: hidden;
}

.app-banner h2 {
    font-size: 22px;
    margin: 0 0 12px;
}

.app-banner p {
    margin: 0 0 22px;
}

.app-banner img {
    align-self: end;
    width: 320px;
    max-height: 210px;
    object-fit: contain;
}

.app-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-buttons span,
.store-btn {
    background: white;
    color: #222;
    border-radius: 4px;
    padding: 9px 14px;
    font-size: 12px;
    display: inline-block;
    border: 1px solid #ddd;
}

.bottom-links {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 28px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.bottom-links a {
    padding: 16px 38px;
    color: #666;
    border-right: 1px solid #eee;
}

.bottom-links a:last-child {
    border-right: 0;
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.detail-title-row h1 {
    font-size: 20px;
    margin: 0;
    flex: 1;
}

.verified {
    color: #1285c8;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 18px;
    align-items: start;
}

.detail-top {
    background: white;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 18px;
    padding: 14px;
}

.gallery {
    position: relative;
}

.gallery > img {
    width: 100%;
    height: 276px;
    object-fit: cover;
    background: #eee;
}

.gallery-arrow {
    position: absolute;
    top: 126px;
    width: 34px;
    height: 34px;
    border: 0;
    background: rgba(255,255,255,.85);
    border-radius: 50%;
    color: #999;
    font-size: 26px;
    cursor: pointer;
}

.gallery-arrow.left {
    left: 8px;
}

.gallery-arrow.right {
    right: 8px;
}

.gallery-count {
    position: absolute;
    right: 14px;
    bottom: 128px;
    background: rgba(0,0,0,.65);
    color: white;
    border-radius: 13px;
    padding: 4px 9px;
    font-size: 11px;
}

.thumb-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.thumb {
    width: 78px;
    height: 62px;
    border: 2px solid #ddd;
    padding: 0;
    background: white;
    cursor: pointer;
    flex: none;
}

.thumb.active {
    border-color: var(--red);
}

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

.quick-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.quick-detail-actions a {
    width: 84px;
    min-height: 58px;
    border: 1px solid #ddd;
    display: grid;
    place-items: center;
    color: var(--red);
    font-size: 12px;
}

.price-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-line strong {
    color: var(--red);
    font-size: 21px;
}

.price-line button {
    border: 0;
    background: transparent;
    color: var(--red);
    font-size: 18px;
}

.location-line {
    margin: 7px 0 10px;
    font-weight: 700;
    font-size: 12px;
}

.detail-info table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.detail-info th,
.detail-info td {
    border-bottom: 1px solid #eee;
    padding: 6px 3px;
    text-align: left;
}

.detail-info th {
    width: 48%;
    color: #777;
    font-weight: 500;
}

.detail-info td {
    font-weight: 700;
}

.alert-box {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--red);
    color: #d71920;
    padding: 12px;
    display: grid;
    gap: 4px;
    font-size: 12px;
}

.tabs-box {
    margin-top: 12px;
    background: white;
    border: 1px solid var(--border);
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tabs button {
    border: 0;
    background: #f8f8f8;
    border-right: 1px solid #ddd;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
}

.tabs button.active {
    background: white;
    color: var(--red);
    border-top: 3px solid var(--red);
}

.description {
    padding: 24px;
    line-height: 1.45;
}

.description h2 {
    font-size: 17px;
}

.description h3 {
    font-size: 14px;
    margin-top: 20px;
}

.description ul {
    padding-left: 18px;
}

.detail-sidebar {
    display: grid;
    gap: 14px;
}

.advisor-card {
    background: white;
    border: 1px solid var(--border);
    text-align: center;
    padding: 18px;
}

.office-small {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto -12px 60px;
    border: 2px solid white;
}

.agent-small {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin: -40px 55px 8px auto;
    border: 2px solid white;
}

.advisor-card h3 {
    font-size: 14px;
    margin: 0;
}

.advisor-card p {
    font-size: 12px;
    margin: 4px 0;
}

.advisor-card span,
.advisor-card small {
    color: #777;
    font-size: 11px;
}

.outline-wide {
    display: block;
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.whatsapp {
    color: #0b8f43;
}

.side-warning,
.other-listings {
    background: white;
    border: 1px solid var(--border);
    padding: 16px;
    font-size: 12px;
}

.side-warning strong {
    color: #555;
}

.other-listings h3 {
    font-size: 13px;
    margin: 0 0 12px;
}

.other-listings a {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 8px;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.other-listings img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    grid-row: span 2;
}

.other-listings span {
    font-size: 11px;
}

.other-listings b {
    font-size: 12px;
}

.ad-red {
    background: linear-gradient(135deg, #e21b1b, #a80011);
    min-height: 250px;
    color: white;
    padding: 28px 22px;
    display: grid;
    align-content: center;
    text-align: center;
    gap: 15px;
}

.ad-red span {
    font-size: 12px;
    letter-spacing: 2px;
}

.ad-red strong {
    font-size: 24px;
    line-height: 1.1;
}

.ad-red a {
    background: white;
    color: var(--red);
    border-radius: 20px;
    padding: 10px 14px;
    font-weight: 700;
}

.trend-searches {
    margin-top: 28px;
}

.trend-searches h2 {
    font-size: 18px;
}

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

.trend-grid a {
    background: white;
    border: 1px solid #ddd;
}

.trend-grid img {
    height: 110px;
    width: 100%;
    object-fit: cover;
}

.trend-grid span {
    display: block;
    padding: 12px;
    font-weight: 700;
    font-size: 12px;
}

.site-footer {
    background: white;
    border-top: 1px solid #e1e1e1;
    margin-top: 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1.5fr;
    min-height: 170px;
    border-left: 1px solid #eee;
}

.footer-top > div {
    padding: 24px;
    border-right: 1px solid #eee;
}

.footer-top h4 {
    margin: 0 0 12px;
    font-size: 12px;
    color: #555;
}

.footer-top a {
    display: block;
    color: #555;
    font-size: 12px;
    margin-bottom: 7px;
}

.social-row {
    display: flex;
    gap: 10px;
}

.social-row span {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    display: grid;
    place-items: center;
    border-radius: 3px;
    color: #1d5fae;
    font-weight: 700;
}

.store-btn {
    margin-bottom: 10px;
}

.footer-bottom {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 22px 0 34px;
    font-size: 10px;
    color: #777;
}

.footer-brand {
    display: flex;
    align-items: center;
    color: var(--red);
}

.error-page {
    padding: 70px 0;
}

@media (max-width: 1050px) {
    .container {
        max-width: calc(100% - 28px);
    }

    .header-search,
    .main-nav {
        display: none;
    }

    .header-actions {
        margin-left: auto;
    }

    .listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout,
    .office-layout,
    .detail-top {
        grid-template-columns: 1fr;
    }

    .office-card {
        position: static;
    }

    .detail-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions,
    .showcase-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .city-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .app-banner {
        padding: 30px;
    }

    .app-banner img {
        display: none;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .login-btn,
    .round-btn {
        display: none;
    }

    .post-btn {
        padding: 9px 12px;
        font-size: 12px;
    }

    .hero h1 {
        font-size: 21px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search input,
    .hero-search button,
    .map-btn {
        width: 100%;
    }

    .list-head {
        display: block;
    }

    .list-filters {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 12px;
    }

    .listing-grid,
    .quick-actions,
    .showcase-grid,
    .news-grid,
    .city-grid,
    .detail-sidebar,
    .trend-grid {
        grid-template-columns: 1fr;
    }

    .gallery > img {
        height: 240px;
    }

    .detail-title-row {
        display: block;
    }

    .tabs {
        overflow-x: auto;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
    }

    .bottom-links {
        overflow-x: auto;
        justify-content: start;
    }

    .bottom-links a {
        white-space: nowrap;
        padding: 14px 22px;
    }
}
