@font-face {
  font-family: Rubik;
  src: url(fonts/rubik-variablefont-wght.ttf);
}

@font-face {
  font-family: Poppins;
  src: url(fonts/poppins-thin.ttf);
}

@font-face {
  font-family: Poppins Bold;
  src: url(fonts/poppins-bold.ttf);
}


/* --- Global Styles --- */
body {
  /* Old browsers */
  background: #dfd6cb;
  /* Chrome 10-25, Safari 5.1-6 */
  background: #ededed;
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  background: #ededed;
  margin: 0;
  padding: 0;
}


/* --- Header and Navigation --- */
header {
  background-color: #fcf6f0;
  padding: 10px 0;
  text-align: center;
  z-index: 1;
}
nav {
  background-color: #fcf6f0;
}
nav img {
  display: block;
  width: 20%;
  margin: 0 auto;
  padding: 5px 0;
}
nav img:hover {
  opacity: 0.8;
}

/* --- Property Details Container --- */
.property-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.property-listing {
  max-width: 1000px;   /* Reduce width to make it more centered and narrower */
  margin: 0 auto;      /* Keep it centered within the page */
  padding: 20px 40px;  /* Add horizontal padding for extra side space */
}

/* --- Gallery Section --- */
.property-gallery {
  flex: 1 1 400px;
  padding: 10px;
}
.featured-image-shell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #f5efe8;
}
.featured-image-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  transform: translateX(-100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.property-gallery.is-loading .featured-image-shell::after {
  opacity: 1;
  animation: gallery-shimmer 1.1s linear infinite;
}
.featured-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  display: block;
  transition: opacity 0.25s ease;
}
.property-thumbnails {
  display: flex;
  flex-wrap: wrap; /* Allows the thumbnails to wrap into new lines */
  justify-content: center; /* Centers thumbnails horizontally */
  gap: 10px; /* Adds uniform spacing between thumbnails */
  margin-top: 14px;
}

.property-thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 2px solid rgba(231, 204, 171, 0.7);
  border-radius: 12px;
  cursor: pointer;
  background: #f5efe8;
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.property-thumbnails img.is-placeholder {
  object-fit: contain;
  padding: 12px;
}

.property-thumbnails img.is-active {
  border-color: #7f6558;
  box-shadow: 0 10px 18px rgba(127, 101, 88, 0.18);
}

/* Optional hover effect */
.property-thumbnails img:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  border-color: #b08f7d;
}



/* --- Details Section --- */
.property-details {
  flex: 1 1 400px;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
}
.property-title {
  font-family: 'Poppins Bold', sans-serif;
  font-size: 2em;
  margin-bottom: 10px;
  color: #353232;
}
.property-location,
.property-price,
.property-size {
  font-family: Rubik;
  font-size: 1.2em;
  font-weight: 300;
  color: #353232;
  margin-bottom: 10px;
}

.property-bono {
  display: inline-block;
  text-decoration: none;
  background-color: #e7ccab;
  color: #353232;
  padding: 10px 20px;
  border-radius: 5px;
  font-family: 'Poppins Bold', sans-serif;
  font-size: 1em;
  transition: background-color 0.3s ease;
}
.property-description {
  font-family: Poppins;
  font-weight: 700;
  font-size: 1em;
  color: #555;
  margin: 20px 0;
  line-height: 1.6;
}

/* --- Contact Button --- */
.contact-button {
  display: inline-block;
  text-decoration: none;
  background-color: #e7ccab;
  color: #353232;
  padding: 10px 20px;
  border-radius: 5px;
  font-family: 'Poppins Bold', sans-serif;
  font-size: 1em;
  transition: background-color 0.3s ease;
}
.contact-button:hover {
  background-color: #d2bba0;
}

/* --- Footer --- */
footer {
  background-color: #2e1c0c;
  margin-top: 20px;
  height: 100px;
}
footer span {
  text-align: center;
  display: block;
  position: relative;
  top: 40px;
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  font-size: 15px;
  font-family: Poppins, sans-serif;
}

.footerbutton {
  font-family: Poppins;
  color: #c0b79b;
  padding: 0px 40px;
  border-radius: 2px;
  font-family: 'Poppins Bold', sans-serif;
  font-size: 1em;
  transition: background-color 0.3s ease;
}
.footerbutton:hover {
  opacity: 50%;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .property-container {
    flex-direction: column;
  }
  .property-details {
    padding: 10px;
  }

  .featured-image-shell {
    border-radius: 12px;
  }

  .featured-image {
    border-radius: 12px;
  }

  .property-thumbnails {
    justify-content: flex-start;
  }

  .property-thumbnails img {
    width: 70px;
    height: 70px;
  }
}

@keyframes gallery-shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* --- Phase 4: specification table, status badge, freshness, FAQ --- */
.property-meta { margin: 6px 0 2px; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-family: 'Poppins Bold', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e6f4ea;
  color: #1e6b34;
  border: 1px solid #b7dfc4;
}
.status-badge.status-reservado { background: #fdf3d8; color: #8a6100; border-color: #f0dca6; }
.status-badge.status-vendido,
.status-badge.status-alquilado { background: #f4e6e6; color: #8a2020; border-color: #e2bcbc; }

.property-freshness {
  margin: 2px 0 14px;
  font-size: 0.85rem;
  color: #7f6558;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
.spec-table caption {
  text-align: left;
  font-family: 'Poppins Bold', sans-serif;
  font-size: 1.05rem;
  padding-bottom: 8px;
}
.spec-table th,
.spec-table td {
  border: 1px solid #e7ddd2;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.spec-table th[scope="row"] {
  width: 38%;
  background: #faf5ef;
  font-family: 'Poppins Bold', sans-serif;
  font-weight: normal;
}
.spec-table tbody tr:nth-child(even) td { background: #fdfaf7; }

.sector-link { margin: 14px 0; }

.property-faq { margin: 28px 0; }
.property-faq h2 { font-family: 'Poppins Bold', sans-serif; font-size: 1.15rem; }
.property-faq dt { font-family: 'Poppins Bold', sans-serif; margin-top: 12px; }
.property-faq dd { margin: 4px 0 0; }

@media (max-width: 600px) {
  .spec-table { font-size: 0.9rem; }
  .spec-table th[scope="row"] { width: 45%; }
}
