html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  color: #2f2a20;
  background: #fbf7ef;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: #6f3f27;
}

.page-shell {
  flex: 1 0 auto;
  padding-left: clamp(1rem, 2.5vw, 2.5rem);
  padding-right: clamp(1rem, 2.5vw, 2.5rem);
}

.page-shell main {
  padding-bottom: 4rem !important;
}

.navbar-brand {
  font-weight: 700;
}

.navbar {
  background: #fffaf2 !important;
}

.language-switcher {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.language-switcher a {
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  color: #6f3f27;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus {
  background: #f1e3cf;
}

.page-header,
.home-intro,
.discovery-hero {
  max-width: 760px;
  padding: 2.5rem 0;
}

.discovery-hero {
  max-width: none;
  padding: 0.25rem 0 0.75rem;
}

.discovery-hero h1 {
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  margin-bottom: 0.5rem;
}

.discovery-hero .lead {
  font-size: 1rem;
  margin-bottom: 0;
}

.home-copy {
  max-width: 720px;
  padding-bottom: 3rem;
}

.eyebrow {
  color: #7c5f2d;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.filter-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-bar .form-select {
  max-width: 320px;
}

.compact-filter {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  padding: 0.75rem;
}

.filter-bar--stacked {
  align-items: flex-start;
  flex-direction: column;
}

.filter-bar__heading {
  display: grid;
  gap: 0.2rem;
}

.filter-bar__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.filter-bar__hint {
  color: #7c5f2d;
  font-size: 0.88rem;
  margin: 0;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  width: 100%;
}

.category-chip {
  align-items: center;
  background: #fffaf2;
  border: 1px solid #d8c7a8;
  border-radius: 999px;
  color: #6f3f27;
  display: inline-flex;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.category-chip small {
  background: #f1e3cf;
  border-radius: 999px;
  color: #7c5f2d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.3rem 0.45rem;
}

.category-chip:hover,
.category-chip:focus,
.category-chip.is-active {
  background: #8f4a2f;
  border-color: #8f4a2f;
  color: #fffaf2;
}

.category-chip:hover small,
.category-chip:focus small,
.category-chip.is-active small {
  background: rgba(255, 250, 242, 0.18);
  color: #fffaf2;
}

.discovery-layout {
  display: grid;
  align-items: start;
  gap: 1.25rem;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
  margin-bottom: 3rem;
}

.discovery-content {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
}

.discovery-map-panel {
  min-width: 0;
}

.map-card {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  overflow: hidden;
  padding: 0.75rem;
}

.discovery-map,
.map-empty {
  border-radius: 6px;
  height: 420px;
  width: 100%;
}

.map-empty {
  align-items: center;
  background: #f1e3cf;
  color: #6f3f27;
  display: flex;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.admin-listing-map,
.admin-map-empty {
  border: 1px solid #dbe4de;
  border-radius: 8px;
  height: 380px;
  overflow: hidden;
  width: 100%;
}

.admin-map-empty {
  align-items: center;
  background: #eef4f0;
  color: #5f7669;
  display: flex;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.admin-listing-actions {
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.discovery-list {
  display: grid;
  gap: 0.75rem;
}

.listing-image {
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.listing-image--square {
  aspect-ratio: 1 / 1;
}

.listing-image--landscape {
  aspect-ratio: 16 / 9;
}

.listing-image--detail {
  aspect-ratio: 4 / 3;
  background: #f4ead9;
}

.listing-image--gallery {
  aspect-ratio: 4 / 3;
  background: #f4ead9;
}

.listing-image__img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.listing-image__img--contain {
  object-fit: contain;
}

.preview-card {
  align-items: stretch;
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 112px;
  overflow: hidden;
  padding: 0.55rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.preview-card.is-active {
  border-color: #8f4a2f;
  box-shadow: 0 12px 24px rgba(111, 63, 39, 0.12);
  transform: translateY(-1px);
}

.preview-card__media {
  aspect-ratio: 4 / 3;
  background: #f4ead9;
  border-radius: 6px;
  height: 84px;
  overflow: hidden;
  position: relative;
  width: 112px;
}

.preview-card__image {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.preview-card__placeholder {
  align-items: center;
  background: #f1e3cf;
  color: #7c5f2d;
  display: flex;
  height: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1.15;
  padding: 0.4rem;
  text-align: center;
  text-transform: uppercase;
}

.preview-card__placeholder span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-card__body {
  align-content: start;
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.preview-card__body h2 {
  display: -webkit-box;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-card__body p {
  font-size: 0.875rem;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.preview-card__meta {
  align-items: center;
  color: #7c5f2d;
  display: flex;
  font-size: 0.8rem;
  gap: 0.35rem;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  min-width: 0;
}

.preview-card__meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-card__meta span + span::before {
  content: "/";
  margin-right: 0.35rem;
}

.preview-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-card__cta {
  font-size: 0.85rem;
  font-weight: 700;
  justify-self: start;
  line-height: 1.2;
  margin-top: 0.1rem;
  text-decoration: none;
}

.preview-card__cta:hover,
.preview-card__cta:focus {
  text-decoration: underline;
}

.preview-card__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.preview-card__map-action {
  background: none;
  border: 0;
  color: #7c5f2d;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.empty-state {
  background: #fff;
  border: 1px dashed #d8c7a8;
  border-radius: 12px;
  padding: 1.25rem;
}

.empty-state h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.empty-state p {
  color: #6a5a3d;
  margin-bottom: 1rem;
}

.listing-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.listing-card {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  overflow: hidden;
}

.listing-card .listing-image {
  border-radius: 0;
}

.listing-card__body {
  padding: 1rem;
}

.listing-card__meta {
  color: #7c5f2d;
  font-size: 0.925rem;
  margin-bottom: 0.35rem;
}

.listing-map {
  border: 1px solid #dbe4de;
  border-radius: 8px;
  min-height: 360px;
  width: 100%;
}

.listing-detail {
  margin-bottom: 3rem;
}

.listing-detail__header {
  max-width: 920px;
  padding: 1rem 0 1.5rem;
}

.listing-detail__header h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
}

.listing-detail__layout {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.listing-detail__main {
  min-width: 0;
}

.listing-detail__aside {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.detail-cover-media {
  width: 100%;
}

.detail-image-empty {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #f1e3cf;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  color: #7c5f2d;
  display: flex;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.detail-image-strip {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin-top: 0.75rem;
}

.detail-strip-media {
  min-width: 0;
}

.detail-section {
  margin-bottom: 2.5rem;
}

.related-listings {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-listing {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 10px;
  overflow: hidden;
}

.related-listing__media {
  border-radius: 0;
}

.related-listing__body {
  padding: 0.9rem 1rem 1rem;
}

.related-listing__meta {
  color: #7c5f2d;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.related-listing h3 {
  font-size: 1rem;
  margin: 0;
}

.detail-section > p {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 820px;
}

.detail-info-panel {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  padding: 1rem;
}

.detail-info-panel h2 {
  margin-bottom: 1rem;
}

.detail-info-panel dl,
.detail-info-panel p {
  margin-bottom: 0;
}

.detail-info-panel dt {
  color: #7c5f2d;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.detail-info-panel dt:first-child {
  margin-top: 0;
}

.detail-info-panel dd {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.inquiry-message {
  white-space: pre-wrap;
}

.whatsapp-cta {
  margin-top: 0.25rem;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.legal-section address {
  line-height: 1.7;
}

.public-form-page {
  margin: 0 auto 3rem;
  max-width: 820px;
}

.public-form-intro {
  padding: 1rem 0 1.5rem;
}

.public-form {
  background: #fff;
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  padding: 1rem;
}

.detail-map,
.detail-map-empty {
  border: 1px solid #d8c7a8;
  border-radius: 8px;
  height: 360px;
  overflow: hidden;
  width: 100%;
}

.btn {
  border-radius: 8px;
}

.btn-primary {
  background-color: #8f4a2f;
  border-color: #8f4a2f;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #6f3f27;
  border-color: #6f3f27;
}

.btn-outline-primary {
  border-color: #8f4a2f;
  color: #8f4a2f;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #8f4a2f;
  border-color: #8f4a2f;
}

.site-footer {
  background: #efe2cf;
  color: #5b4b34;
  line-height: 1.5;
  padding: 1.25rem 0;
}

.site-footer__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer a {
  color: #6f3f27;
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .home-intro,
  .discovery-hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .filter-bar,
  .filter-bar .form-select {
    align-items: stretch;
    width: 100%;
  }

  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    width: 100%;
  }

  .preview-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .preview-card__media {
    height: 72px;
    width: 96px;
  }
}

@media (max-width: 991.98px) {
  .discovery-layout {
    grid-template-columns: 1fr;
  }

  .listing-detail__layout {
    grid-template-columns: 1fr;
  }

  .discovery-map-panel {
    order: 2;
  }

  .discovery-content {
    order: 1;
  }

  .discovery-map,
  .map-empty {
    height: 360px;
  }
}
