:root {
    --ink: #17313b;
    --muted: #5d6d73;
    --line: #d5e0e1;
    --paper: #ffffff;
    --soft: #eef5f3;
    --canvas: #f7f9f8;
    --navy: #163b48;
    --brand: #0d7d76;
    --brand-dark: #075b57;
    --accent: #cf573e;
    --gold: #deb75d;
    --focus: #1768a6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif; letter-spacing: 0; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.site-shell { width: min(100% - 32px, 1380px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid #cbd8da; background: rgba(255,255,255,.98); box-shadow: 0 3px 18px rgba(23,49,59,.06); }
.site-nav-wrap { min-height: 104px; display: flex; align-items: center; gap: 22px; }
.site-brand { flex: 0 0 auto; }
.site-brand img { width: 104px; height: 104px; object-fit: contain; }
.site-navigation { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.site-navigation a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 12px 0; }
.site-navigation a:hover { color: var(--brand-dark); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; padding: 11px; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); }
.language-menu { position: relative; }
.language-menu summary { min-width: 46px; min-height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-weight: 800; list-style: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu > div { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); box-shadow: 0 12px 30px rgba(32,42,44,.14); }
.language-menu a { display: block; padding: 10px; color: var(--ink); text-decoration: none; }
.language-menu a[aria-current="page"] { color: var(--brand-dark); background: var(--soft); font-weight: 700; }
.site-footer { margin-top: 70px; padding: 42px 0 20px; color: #fff; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: minmax(230px, 1.3fr) repeat(3, minmax(140px, 1fr)); gap: 34px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 72px; height: 72px; object-fit: contain; }
.footer-brand div, .footer-links, .footer-contact { display: grid; gap: 8px; }
.footer-brand span { color: #c5d9d8; font-size: 13px; }
.footer-grid a { width: fit-content; color: #e7f0ef; text-decoration: none; }
.contact-method-list { display: grid; gap: 8px; }
.contact-method { width: min(100%, 390px); min-height: 50px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 10px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 4px; background: #fff; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.contact-method:hover { color: var(--brand-dark); border-color: var(--brand); transform: translateY(-1px); }
.contact-method:focus-visible { outline: 3px solid rgba(19, 139, 128, .32); outline-offset: 2px; }
.contact-method-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--brand-dark); border-radius: 4px; }
.contact-method-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-method small, .contact-method strong { display: block; }
.contact-method small { color: var(--muted); font-size: 11px; line-height: 1.2; text-transform: uppercase; }
.contact-method strong { overflow-wrap: anywhere; font-size: 14px; }
.contact-method-whatsapp .contact-method-icon { background: #1f7a59; }
.site-footer .contact-method-list { gap: 4px; }
.site-footer .contact-method { width: 100%; min-height: 36px; grid-template-columns: 30px minmax(0, 1fr); gap: 7px; padding: 2px 0; color: #e7f0ef; border: 0; background: transparent; }
.site-footer .contact-method:hover { color: #fff; transform: none; }
.site-footer .contact-method-icon { width: 28px; height: 28px; color: #7ad5cc; border: 1px solid rgba(255, 255, 255, .25); background: transparent; }
.site-footer .contact-method-icon svg { width: 17px; height: 17px; }
.site-footer .contact-method small { color: #9fbdbc; }
.site-footer .contact-method strong { font-size: 13px; }
.footer-grid a:hover { color: #7ad5cc; }
.footer-languages { display: flex; flex-wrap: wrap; gap: 9px; }
.footer-languages strong { flex-basis: 100%; }
.footer-languages a { min-width: 40px; min-height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 3px; }
.footer-bottom { margin-top: 30px; padding-top: 18px; color: #b8cecc; border-top: 1px solid rgba(255,255,255,.18); font-size: 13px; }
.message-list { padding-top: 16px; }
.site-message { padding: 14px 16px; border-left: 4px solid var(--brand); background: #eaf5f3; }

.catalog-heading { padding: 34px 0 25px; color: #fff; border-bottom: 4px solid var(--brand); background: var(--navy); }
.catalog-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.catalog-heading h1 { margin: 0 0 6px; color: #fff; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }
.result-count { margin: 0; color: #cfe3df; }
.filter-toggle { display: none; align-items: center; gap: 8px; min-height: 46px; padding: 10px 15px; color: #fff; border: 0; border-radius: 4px; background: var(--brand-dark); }
.filter-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.catalog-layout { display: grid; grid-template-columns: minmax(400px, 430px) minmax(0, 1fr); gap: 24px; padding-top: 30px; }
.filter-panel { align-self: start; position: sticky; top: 94px; max-height: calc(100vh - 114px); overflow-y: auto; scrollbar-gutter: stable; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 6px; background: var(--paper); box-shadow: 0 10px 28px rgba(23,49,59,.08); }
.filter-panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.filter-panel h2 { margin: 0; font-size: 22px; }
.filter-close { display: none; width: 44px; height: 44px; border: 0; background: transparent; font-size: 30px; }
.filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.form-errors, .filter-group-title, .filter-field-wide { grid-column: 1 / -1; }
.filter-group-title { margin: 7px 0 -2px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--brand-dark); font-size: 14px; letter-spacing: 0; }
.filter-field { min-width: 0; }
.filter-field label { min-height: 34px; display: flex; align-items: flex-end; margin-bottom: 5px; color: #39484b; font-size: 13px; font-weight: 700; }
.distance-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; align-items: start; }
.distance-filter-row .catalog-input { min-width: 0; }
.filter-complex-search { padding: 12px; border: 1px solid #9fc8c3; border-radius: 4px; background: #edf7f5; }
.filter-complex-search label { min-height: 0; color: var(--brand-dark); font-size: 14px; }
.filter-complex-search .catalog-input { border-color: #789f9b; background: #fff; }
.filter-complex-search .catalog-input:focus { outline: 3px solid rgba(18, 135, 125, .18); border-color: var(--brand); }
.catalog-input, .detail-input { width: 100%; min-height: 44px; padding: 9px 10px; color: var(--ink); border: 1px solid #a9b9bc; border-radius: 4px; background: var(--paper); }
textarea.detail-input { min-height: 132px; resize: vertical; }
.errorlist { list-style: none; margin: 5px 0 0; padding: 0; color: #a52e20; font-size: 13px; }
.filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.primary-action, .secondary-action, .icon-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-action { padding: 10px 16px; color: #fff; border: 1px solid var(--brand-dark); background: var(--brand-dark); }
.primary-action:hover { color: #fff; background: var(--brand); text-decoration: none; }
.secondary-action { padding: 10px 16px; color: var(--ink); border: 1px solid #9eabaa; background: var(--paper); }
.secondary-action:hover { color: var(--brand-dark); border-color: var(--brand); text-decoration: none; }
.icon-action { width: 44px; padding: 0; color: var(--ink); border: 1px solid #9eabaa; background: var(--paper); }
.icon-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.catalog-results { min-width: 0; }
.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 22px; }
.property-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 9px 26px rgba(23,49,59,.08); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.property-card:hover { border-color: #a9c1c1; background: var(--paper); box-shadow: 0 14px 34px rgba(23,49,59,.13); transform: translateY(-2px); }
.property-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.property-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .25s ease; }
.property-card:hover .property-media > img { transform: scale(1.025); }
.image-fallback { width: 100%; height: 100%; display: grid; place-items: center; padding: 28px; background: #e9f0ef; }
.image-fallback img { width: min(70%, 230px); height: auto; }
.status-badge, .featured-badge { position: absolute; top: 12px; padding: 6px 9px; color: #fff; border-radius: 3px; font-size: 12px; font-weight: 800; }
.status-badge { left: 12px; background: var(--brand-dark); }
.status-sold { background: var(--accent); }
.status-reserved { color: var(--ink); background: var(--gold); }
.featured-badge { right: 12px; color: var(--ink); background: var(--gold); }
.property-card-body { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.property-price { color: var(--accent); font-size: 25px; font-weight: 900; }
.property-card h2 { min-height: 52px; margin: 5px 0 7px; font-size: 20px; line-height: 1.28; }
.property-card h2 a { color: var(--ink); text-decoration: none; }
.property-location { min-height: 24px; display: flex; gap: 7px; align-items: center; margin: 0 0 12px; color: var(--muted); }
.property-location svg, .detail-location svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.8; }
.property-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 6px; padding: 10px 0; border-block: 1px solid var(--line); }
.property-facts span { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.property-facts svg { width: 18px; height: 18px; fill: none; stroke: var(--brand-dark); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.property-summary { min-height: 63px; margin: 13px 0 10px; color: #465457; font-size: 14px; line-height: 1.5; }
.property-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.property-meta span { padding: 5px 7px; border-radius: 3px; color: #36545a; background: #eaf3f1; font-size: 11px; }
.card-actions { display: flex; gap: 8px; margin-top: 15px; }
.card-actions .primary-action { flex: 1; }
.pagination-nav { margin-top: 30px; display: flex; justify-content: center; align-items: center; gap: 12px; }
.pagination-nav a, .pagination-nav span { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; }
.empty-state { min-height: 380px; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; border: 1px dashed #aeb9b8; background: var(--soft); }
.empty-state svg { width: 54px; height: 54px; margin-bottom: 15px; fill: none; stroke: var(--brand); stroke-width: 1.4; }
.empty-state h2 { font-size: 24px; }

.detail-page { padding-top: 22px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.preview-notice { margin-bottom: 14px; padding: 10px 14px; border-left: 4px solid var(--gold); background: #fff6dc; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 34px; align-items: start; }
.property-gallery, .detail-summary, .detail-copy, .inquiry-panel { min-width: 0; }
.gallery-main { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); box-shadow: 0 10px 30px rgba(23,49,59,.08); }
.gallery-main > img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #e9f0ef; }
.gallery-thumbnails { width: 100%; max-width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 9px; overflow-x: auto; padding: 10px 2px; scrollbar-width: thin; }
.gallery-thumb { position: relative; width: 112px; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 4px; background: var(--soft); }
.gallery-thumb.is-active { border-color: var(--brand); }
.gallery-thumb > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.detail-summary { position: sticky; top: 100px; }
.detail-reference { color: var(--brand-dark); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.detail-summary h1 { margin: 9px 0 10px; font-size: clamp(29px, 4vw, 45px); line-height: 1.08; overflow-wrap: anywhere; }
.property-spec-panel { margin-top: 18px; border: 1px solid var(--line); background: var(--paper); }
.property-spec-panel h2 { margin: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 18px; }
.property-specs { margin: 0; }
.property-specs div { display: grid; grid-template-columns: minmax(130px, .9fr) minmax(0, 1.1fr); border-bottom: 1px solid var(--line); }
.property-specs div:last-child { border-bottom: 0; }
.property-specs dt, .property-specs dd { min-width: 0; margin: 0; padding: 10px 13px; overflow-wrap: anywhere; }
.property-specs dt { border-right: 1px solid var(--line); font-weight: 800; }
.property-specs dd { color: var(--ink); }
.property-specs .property-spec-price dd { color: var(--accent); font-size: 20px; font-weight: 900; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.detail-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 410px); gap: 54px; margin-top: 48px; }
.detail-copy h2, .inquiry-panel h2, .similar-section h2 { margin: 0 0 16px; font-size: 26px; }
.detail-copy section { margin-bottom: 38px; }
.detail-copy p { font-size: 17px; line-height: 1.7; }
.property-map { overflow: hidden; margin-top: 18px; border: 1px solid var(--line); background: var(--soft); }
.property-map iframe { width: 100%; min-height: 340px; display: block; border: 0; aspect-ratio: 16 / 9; }
.property-map-caption { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.property-map-caption a { flex: 0 0 auto; color: var(--brand-dark); font-weight: 800; }
.inquiry-panel { align-self: start; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 4px; background: var(--paper); box-shadow: 0 10px 28px rgba(23,49,59,.07); }
.inquiry-reference { color: var(--muted); }
.inquiry-panel form { display: grid; gap: 14px; }
.detail-field label { display: block; margin-bottom: 5px; font-weight: 700; }
.similar-section { margin-top: 48px; }
.similar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.similar-card { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.similar-card a { height: 100%; display: grid; grid-template-rows: auto 1fr; color: var(--ink); text-decoration: none; }
.similar-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.similar-card-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.similar-card > a > span:not(.similar-card-media) { display: grid; gap: 5px; padding: 14px; }
.similar-card strong { color: var(--accent); font-size: 21px; }
.similar-card small { color: var(--muted); }
.mobile-contact-bar { display: none; }

@media (max-width: 1024px) {
    .site-navigation { gap: 13px; }
    .catalog-heading-row { align-items: center; }
    .filter-toggle { display: inline-flex; }
    .catalog-layout { display: block; padding-top: 18px; }
    .filter-panel { position: fixed; z-index: 300; inset: 0; top: 0; max-height: 100dvh; display: none; overflow-y: auto; padding: 18px max(18px, env(safe-area-inset-right)) 30px max(18px, env(safe-area-inset-left)); border: 0; border-radius: 0; }
    .filter-panel.is-open { display: block; }
    .filter-close { display: block; }
    .filter-form { max-width: 760px; margin-inline: auto; }
    .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-hero { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 24px; }
}

@media (max-width: 768px) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    .site-shell { width: min(100% - 24px, 1380px); }
    .site-nav-wrap { min-height: 88px; gap: 10px; }
    .site-brand img { width: 88px; height: 88px; }
    .nav-toggle { display: block; margin-left: auto; }
    .site-navigation { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 8px 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
    .site-navigation.is-open { display: grid; }
    .site-navigation a { min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
    .catalog-heading { padding: 26px 0 20px; }
    .catalog-heading-row { align-items: center; }
    .catalog-heading h1 { font-size: 31px; }
    .filter-form { max-width: 600px; margin-inline: auto; }
    .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-hero, .detail-content-grid { grid-template-columns: 1fr; }
    .detail-summary { position: static; }
    .detail-content-grid { gap: 24px; margin-top: 34px; }
    .similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-page { padding-bottom: 72px; }
    .mobile-contact-bar { position: fixed; z-index: 200; right: 0; bottom: 0; left: 0; min-height: 58px; display: grid; grid-template-columns: .55fr .55fr .9fr 1.45fr; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 -4px 18px rgba(32,42,44,.12); }
    .mobile-contact-bar a { display: grid; place-items: center; padding: 8px 6px; color: var(--ink); font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; }
    .mobile-contact-bar a:last-child { color: #fff; background: var(--brand-dark); }
}

@media (max-width: 560px) {
    .catalog-heading-row { display: grid; }
    .filter-toggle { width: 100%; justify-content: center; }
    .filter-form, .filter-actions { grid-template-columns: 1fr; }
    .filter-field label { min-height: 0; }
    .property-grid { grid-template-columns: 1fr; }
    .property-card h2, .property-summary { min-height: 0; }
    .detail-summary h1 { font-size: 31px; }
    .property-specs div { grid-template-columns: minmax(122px, .9fr) minmax(0, 1.1fr); }
    .property-map iframe { min-height: 250px; }
    .property-map-caption { align-items: flex-start; flex-direction: column; gap: 8px; }
    .detail-actions .primary-action { width: 100%; }
    .similar-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .footer-brand { flex-direction: column; }
    .footer-links, .footer-contact { justify-items: center; }
    .footer-languages { justify-content: center; }
}

@media (max-width: 360px) {
    .site-shell { width: min(100% - 18px, 1380px); }
    .site-brand img { width: 78px; height: 78px; }
    .language-menu summary { min-width: 44px; }
    .property-card-body { padding: 15px; }
    .property-facts span { font-size: 12px; }
    .mobile-contact-bar a { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
