:root {
  --bg: #f4efe6;
  --surface: rgba(255, 255, 255, 0.82);
  --text: #162533;
  --muted: #475665;
  --line: rgba(22, 37, 51, 0.12);
  --accent-dark: #8b5d2e;
  --green: #1c9d63;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 20px 60px rgba(22, 37, 51, 0.1);
  --shell: min(1180px, calc(100vw - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(183, 134, 70, 0.2), transparent 22%),
    radial-gradient(circle at top right, rgba(22, 37, 51, 0.08), transparent 18%),
    linear-gradient(180deg, #fcf8f1 0%, var(--bg) 100%);
}

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

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

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 120;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8b5d2e;
  outline-offset: 3px;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(252, 248, 241, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(22, 37, 51, 0.08);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand img {
  width: 54px;
  height: auto;
  aspect-ratio: 250 / 316;
  object-fit: contain;
}

.brand strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.button,
.filter-bar select,
.filter-bar input {
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 1rem;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
}

.button-primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.button-whatsapp {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-card,
.filter-bar,
.card,
.empty-state,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.hero-card,
.selection-box {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.hero-card-wide {
  width: 100%;
}

.selection-box {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero h1,
.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.4rem);
  /*max-width: 14ch;*/
  text-wrap: pretty;
}

.hero p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.hero-metrics,
.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-metrics span {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter-bar {
  padding: 1rem;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  overflow: hidden;
}

.property-card {
  cursor: pointer;
}

.property-card-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.badge-row,
.specs,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.share-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
}

.share-icon-button svg {
  width: 20px;
  height: 20px;
}

.selection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.selection-tag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.badge,
.price-tag,
.spec {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.price-tag {
  background: rgba(183, 134, 70, 0.14);
  color: var(--accent-dark);
  border-color: rgba(183, 134, 70, 0.22);
}

.badge-sold {
  background: rgba(199, 52, 52, 0.12);
  color: #9e2626;
  border-color: rgba(199, 52, 52, 0.2);
}

.empty-state {
  padding: 1.4rem;
  text-align: center;
}

.selection-floating-bar {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 60;
  transform: translateX(-50%);
  width: min(940px, calc(100vw - 1.25rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(22, 37, 51, 0.16);
}

.selection-floating-copy {
  display: grid;
  gap: 0.15rem;
}

.selection-floating-copy strong {
  font-size: 0.98rem;
}

.selection-floating-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.brand-footer img {
  width: 48px;
  height: auto;
  aspect-ratio: 250 / 316;
  object-fit: contain;
}

.footer-note {
  max-width: 34ch;
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
}

.footer-bottom {
  padding-top: 1rem;
  color: var(--muted);
  text-align: center;
}

.footer-bottom p {
  margin: 0.3rem 0;
}

.footer-bottom a {
  font-weight: 700;
}

.select-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
}

.select-row input {
  width: 18px;
  height: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 17, 24, 0.76);
  display: none;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-panel {
  width: min(1100px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.property-page {
  padding: 2rem 0 4rem;
}

.property-hero {
  padding: 1.2rem 0 1.6rem;
}

.property-hero-card {
  width: fit-content;
  max-width: fit-content;
}

.property-hero .hero-card {
  max-width: fit-content;
  justify-self: start;
}

.property-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-bottom: 3rem;
  align-items: start;
}

.property-gallery-card,
.property-summary-card {
  overflow: hidden;
}

.property-gallery-card {
  padding: 1rem;
  align-self: start;
}

.property-main-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.property-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.property-thumbs {
  padding: 1rem 0 0;
}

.property-video {
  padding: 0 1rem 1rem;
}

.property-video video {
  width: 100%;
  border-radius: var(--radius-md);
}

.property-highlights {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.gallery-main img,
.gallery-main video {
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e6dfd4;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.thumbs button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.thumbs img {
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: cover;
}

.property-thumb {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid transparent;
}

.property-thumb.is-active {
  border-color: rgba(139, 93, 46, 0.45);
}

.thumb-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(22, 37, 51, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.media-viewer-panel {
  width: min(1120px, 100%);
}

.media-viewer-main img,
.media-viewer-main video {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #efe6d9;
}

.media-viewer-thumbs {
  margin-top: 1rem;
}

@media (min-width: 901px) {
  .property-gallery-card {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 900px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .property-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .property-hero-card,
  .property-hero .hero-card {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }

  .hero h1 {
    /*max-width: 11ch;*/
    font-size: clamp(1.9rem, 6.4vw, 2.7rem);
    line-height: 1.03;
  }

  .hero-card,
  .selection-box,
  .footer-grid {
    padding: 1.35rem;
  }

  .selection-floating-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-list a {
    min-height: 48px;
    width: 100%;
    padding: 0.45rem 0;
  }
}
