:root {
  --ink: #171716;
  --muted: #6d6a66;
  --paper: #f6f3ee;
  --white: #fff;
  --brand: #ba2d30;
  --brand-dark: #8e1f22;
  --line: #ded9d1;
  --shadow: 0 20px 60px rgba(32, 25, 17, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header { height: 88px; padding: 0 clamp(24px, 5vw, 80px); display: flex; align-items: center; gap: 42px; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(23,23,22,.08); position: relative; z-index: 5; }
.brand img { width: 150px; max-height: 64px; object-fit: contain; }
nav { display: flex; gap: 30px; margin-left: auto; font-weight: 600; font-size: 14px; }
nav a:hover { color: var(--brand); }
.header-cta { padding: 12px 18px; color: var(--white); background: var(--brand); border-radius: 6px; font-weight: 700; font-size: 14px; }
.header-cta:hover { background: var(--brand-dark); }

.hero { min-height: 620px; padding: 110px clamp(24px, 8vw, 130px) 80px; display: grid; align-content: center; background-image: linear-gradient(90deg, rgba(18,16,14,.82), rgba(18,16,14,.25)), var(--hero-image); background-position: center, var(--hero-position, center center); background-size: cover; color: var(--white); }
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 14px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #f29a9c; }
h1, h2, h3 { font-family: Manrope, sans-serif; }
h1 { max-width: 720px; margin: 0; font-size: clamp(46px, 7vw, 82px); line-height: .98; letter-spacing: -.055em; }
.hero-lead { max-width: 610px; margin: 26px 0 44px; font-size: clamp(17px, 2vw, 21px); line-height: 1.6; color: rgba(255,255,255,.86); }

.search-card { max-width: 1180px; display: grid; grid-template-columns: .85fr 1fr 1.25fr auto; gap: 0; color: var(--ink); background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.field { padding: 16px 18px; border-right: 1px solid var(--line); }
.field label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.field select, .field input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: 600 15px "DM Sans", sans-serif; }
.search-card button { padding: 0 26px; border: 0; color: white; background: var(--brand); font: 700 14px "DM Sans", sans-serif; cursor: pointer; }
.search-card button:hover { background: var(--brand-dark); }

.properties { padding: 90px clamp(24px, 8vw, 130px) 110px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 34px; }
.section-heading h2, .trust h2 { max-width: 650px; margin: 0; font-size: clamp(32px, 4vw, 52px); letter-spacing: -.04em; line-height: 1.08; }
.section-heading > p { color: var(--muted); }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.property-card { min-width: 0; overflow: hidden; background: var(--white); border: 1px solid rgba(23,23,22,.08); border-radius: 10px; transition: transform .2s, box-shadow .2s; }
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.property-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9e5df; }
.property-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.property-card:hover .property-media img { transform: scale(1.035); }
.operation-tag, .featured-tag { position: absolute; top: 14px; padding: 7px 10px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.operation-tag { left: 14px; color: var(--white); background: var(--brand); }
.featured-tag { right: 14px; background: rgba(255,255,255,.92); }
.property-body { padding: 22px; }
.property-location { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.property-body h3 { margin: 8px 0 12px; font-size: 20px; letter-spacing: -.025em; }
.property-body h3 a:hover { color: var(--brand); }
.price { margin: 0 0 18px; font-size: 21px; font-weight: 800; }
.features { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 15px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; list-style: none; }

.trust { padding: 100px clamp(24px, 8vw, 130px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; background: #1d1b19; color: var(--white); }
.trust .eyebrow { color: #ef8588; }
.trust-grid { display: grid; gap: 28px; }
.trust-grid article { padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.16); }
.trust-grid strong { font: 700 20px Manrope, sans-serif; }
.trust-grid p { margin: 8px 0 0; color: rgba(255,255,255,.68); line-height: 1.6; }

footer { padding: 60px clamp(24px, 8vw, 130px); display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 50px; color: rgba(255,255,255,.72); background: #11100f; font-size: 14px; line-height: 1.7; }
footer img { width: 150px; margin-bottom: 14px; }
footer strong { display: block; margin-bottom: 12px; color: var(--white); }
footer a { display: block; }
footer a:hover { color: #f29a9c; }
.footer-brand img { width: 145px; }
.footer-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.56); font-size: 11px; }
.social-links { display: flex; align-items: center; gap: 7px; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.social-links a { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: rgba(255,255,255,.85); font-size: 8px; letter-spacing: 0; text-transform: none; }
.social-links a:hover { border-color: #f29a9c; }
.made-in { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.made-in img { width: auto; height: 21px; margin: 0; opacity: .78; }
.powered-by { justify-self: end; color: rgba(255,255,255,.62); white-space: nowrap; }
.powered-by strong { display: inline; margin: 0; color: #fff; }

.detail-page { max-width: 1440px; margin: 0 auto; padding: 44px clamp(24px, 6vw, 90px) 100px; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: 14px; font-weight: 700; }
.back-link:hover { color: var(--brand); }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.detail-heading h1 { max-width: 850px; color: var(--ink); font-size: clamp(38px, 5vw, 66px); }
.detail-heading > div > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.detail-price { white-space: nowrap; margin: 0; font: 800 clamp(26px, 3vw, 38px) Manrope, sans-serif; }
.gallery-shell { position: relative; outline: none; }
.detail-gallery { display: flex; overflow-x: auto; border-radius: 12px; background: #ddd7cf; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.detail-gallery::-webkit-scrollbar { display: none; }
.detail-gallery figure { position: relative; flex: 0 0 100%; height: clamp(360px, 58vw, 680px); margin: 0; scroll-snap-align: start; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery figcaption { position: absolute; right: 18px; bottom: 18px; padding: 7px 11px; border-radius: 20px; color: white; background: rgba(0,0,0,.58); font-size: 12px; font-weight: 700; }
.gallery-arrow { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 34px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.gallery-prev { left: 18px; }.gallery-next { right: 18px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 70px; padding-top: 54px; }
.detail-features { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 0 0 50px; padding: 0 0 28px; border-bottom: 1px solid var(--line); list-style: none; color: var(--muted); }
.detail-features strong { display: block; color: var(--ink); font-size: 23px; }
.detail-content h2, .contact-panel h2 { margin: 0 0 18px; font-size: 30px; letter-spacing: -.035em; }
.description { color: #4e4b47; font-size: 17px; line-height: 1.8; }
.contact-panel { align-self: start; position: sticky; top: 24px; padding: 30px; background: var(--white); border-radius: 12px; box-shadow: var(--shadow); }
.contact-panel > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.primary-button, .secondary-button { display: block; margin-top: 12px; padding: 14px 16px; border-radius: 6px; text-align: center; font-weight: 800; }
.primary-button { color: white; background: var(--brand); }
.secondary-button { border: 1px solid var(--line); }
.contact-panel small { display: block; margin-top: 20px; color: var(--muted); text-align: center; }
.location-section { padding-top: 90px; }
.location-section .section-heading { align-items: center; }
.property-map { height: 480px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); }
.map-page { overflow: hidden; }
.map-layout { display: grid; grid-template-columns: 410px minmax(0,1fr); height: calc(100vh - 88px); }
.map-sidebar { overflow: auto; padding: 32px 24px; background: var(--paper); }
.map-sidebar h1 { margin: 0 0 25px; color: var(--ink); font-size: 38px; line-height: 1.05; }
.map-sidebar form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.map-sidebar select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; font: 600 14px "DM Sans",sans-serif; }
.map-count { margin: 22px 0 12px; color: var(--muted); font-size: 13px; }
.map-list { display: grid; gap: 10px; }
.map-list>a { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 9px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.map-list>a:hover { border-color: var(--brand); }
.map-list img { width: 104px; height: 88px; border-radius: 5px; object-fit: cover; }
.map-list strong,.map-list small,.map-list b { display: block; }
.map-list strong { margin-bottom: 5px; font-size: 13px; line-height: 1.25; }.map-list small { color: var(--muted); font-size: 10px; }.map-list b { margin-top: 9px; font-size: 13px; }
.properties-map { width: 100%; height: 100%; }
.map-popup { width: 260px; }.map-popup img { width: 100%; height: 130px; border-radius: 6px; object-fit: cover; }.map-popup small,.map-popup strong,.map-popup span,.map-popup b,.map-popup a { display: block; }.map-popup small { margin-top: 10px; color: var(--brand); text-transform: uppercase; font-weight: 800; }.map-popup strong { margin-top: 4px; font-size: 15px; }.map-popup span { color: var(--muted); }.map-popup b { margin-top: 8px; }.map-popup a { margin-top: 10px; color: var(--brand); font-weight: 800; }

@media (max-width: 900px) {
  nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero { padding-top: 80px; }
  .search-card { grid-template-columns: 1fr 1fr; }
  .field:nth-child(2) { border-right: 0; }
  .query-field { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .search-card button { min-height: 54px; grid-column: 1 / -1; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr; gap: 48px; }
  .detail-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-panel { position: static; }
  .map-layout { grid-template-columns: 340px minmax(0,1fr); }
}

@media (max-width: 620px) {
  .site-header { height: 76px; padding: 0 18px; }
  .brand img { width: 120px; }
  .header-cta { padding: 10px 12px; font-size: 12px; }
  .hero { min-height: 680px; padding: 68px 20px 50px; }
  .search-card { grid-template-columns: 1fr; }
  .field { border-right: 0; border-bottom: 1px solid var(--line); }
  .query-field { grid-column: auto; border-top: 0; }
  .properties { padding: 64px 20px 76px; }
  .section-heading { align-items: start; flex-direction: column; }
  .property-grid { grid-template-columns: 1fr; }
  .trust { padding: 72px 20px; }
  footer { padding: 54px 20px; grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { grid-template-columns: 1fr; justify-items: start; gap: 15px; }
  .made-in { justify-content: flex-start; }
  .powered-by { justify-self: start; }
  .detail-page { padding: 30px 18px 70px; }
  .detail-heading { align-items: start; flex-direction: column; gap: 20px; }
  .detail-gallery figure { height: 340px; }
  .gallery-arrow { width: 42px; height: 42px; }
  .property-map { height: 360px; }
  .map-page { overflow: auto; }
  .map-layout { display: flex; flex-direction: column; height: auto; }
  .properties-map { order: -1; height: 56vh; min-height: 390px; }
  .map-sidebar { overflow: visible; }
}
